---
title: "updateLayerBlock"
description: "Updates the layer block of the [LayoutModifierNode]. This will mark the layer as invalidated and
schedule a refresh of the layer.

Updating the layer lambda using this method is cheaper than invalidating placement and placing
the layout with a new layer block. This API is expected to be used alongside [Placeable.placeAt]
with a `layerBlock` parameter passed. This will override/update the layerBlock passed in that
API. Whichever one was called last should \"win\"."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun LayoutModifierNode.updateLayerBlock(layerBlock: (GraphicsLayerScope.() -> Unit)?)
```


Updates the layer block of the `LayoutModifierNode`. This will mark the layer as invalidated and
schedule a refresh of the layer.

Updating the layer lambda using this method is cheaper than invalidating placement and placing
the layout with a new layer block. This API is expected to be used alongside `Placeable.placeAt`
with a `layerBlock` parameter passed. This will override/update the layerBlock passed in that
API. Whichever one was called last should "win".

#### Parameters

| | |
| --- | --- |
| layerBlock | the snapshot-observed lambda used to set properties on the layer. if `null`, is provided it will remove the layer. |




