---
title: "withCurrent"
description: "Provides a [block] with the current record, without notifying any read observers."
type: "function"
---

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


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


```kotlin
public inline fun <T : StateRecord, R> T.withCurrent(block: (r: T) -> R): R
```


Provides a `block` with the current record, without notifying any read observers.



