<div class='sourceset sourceset-android'>Android</div>

```kotlin
public class MutableRemoteString
internal constructor(
    @get:Suppress("AutoBoxing") public override val constantValueOrNull: String?,
    internal override val cacheKey: RemoteStateCacheKey,
    private val lazyRemoteString: LazyRemoteString,
) : RemoteString(), MutableRemoteState<String>
```

An implementation of [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) that holds its value in a [MutableState<String>].

## Secondary Constructors

<h2 id="reservetextid-creationstate">reserveTextId</h2>

```kotlin
internal constructor(
    id: Int
) : this(
    constantValueOrNull = null,
    cacheKey = RemoteStateIdKey(id),
    lazyRemoteString =
        object : LazyRemoteString {
            override fun reserveTextId(creationState: RemoteComposeCreationState) = id

            override fun computeRequiredCodePointSet(
                creationState: RemoteComposeCreationState
            ) = null
        },
)
```

Create a MutableRemoteString from an existing id.

<hr class="docs-overload-divider">

<h2 id="reservetextid-creationstate-2">reserveTextId</h2>

```kotlin
internal constructor(
    value: String
) : this(
    constantValueOrNull = null,
    cacheKey = RemoteStateInstanceKey(),
    lazyRemoteString =
        object : LazyRemoteString {
            override fun reserveTextId(creationState: RemoteComposeCreationState) =
                creationState.document.addText(value)

            override fun computeRequiredCodePointSet(
                creationState: RemoteComposeCreationState
            ) = null
        },
)
```

Create a MutableRemoteString for a default value.

## Companion Object

#### Methods

<hr class="docs-overload-divider">

<h2 id="createmutable-initialvalue">createMutable</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public fun createMutable(initialValue: String): MutableRemoteString
```

Creates a new mutable state (allocates an ID).

#### Parameters

| | |
| --- | --- |
| initialValue | The initial value for the state. |

#### Returns

| | |
| --- | --- |
|  | A new [MutableRemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/MutableRemoteString) instance. |