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


<a id='references'></a>


<h2 id="totextfieldbuffer">toTextFieldBuffer</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun TextFieldState.toTextFieldBuffer(): TextFieldBuffer
```


Creates a temporary, mutable `TextFieldBuffer` representing the current state of this
`TextFieldState`.

Use a `TextFieldBuffer` to:
* Apply transformations for testing purposes
* Preview how the TextField would render with a specific `OutputTransformation`

This is similar to calling `TextFieldState.edit`, but without committing the changes back to the
`TextFieldState`.

**Important:** A `TextFieldBuffer` is intended for short-term use. Let the garbage collector
dispose of it when you're finished to avoid unnecessary memory usage.