# androidx.compose.runtime.internal

Common/AllAndroid/JVMNative/C/iOSJavaScript

## Interfaces

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/ComposableLambda` |   | Cmn android N JS |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/ComposableLambdaN` |   | android |

## Annotations

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/Decoy` | With decoys enabled, indicates original composable function that was stubbed by compiler plugin. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/DecoyImplementation` | With decoys enabled, indicates composable implementation function created by compiler plugin. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/FunctionKeyMeta` | This annotation is applied to the FunctionKeyMeta classes created by the Compose Compiler. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/FunctionKeyMetaClass` | This annotation is applied to the FunctionKeyMeta classes created by the Compose Compiler. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/LiveLiteralFileInfo` | This annotation is applied to LiveLiteral classes by the Compose Compiler. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/LiveLiteralInfo` | This annotation is applied to functions on the LiveLiteral classes created by the Compose Compiler. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/StabilityInferred` | This annotation is added on classes by the compiler when their stability is inferred. | Cmn |

## Composables

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/rememberComposableLambda.composable` |   | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/rememberComposableLambdaN.composable` |   | android |

## Top-level functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/ComposableLambda` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeCompilerApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#composableLambda(androidx.compose.runtime.Composer,kotlin.Int,kotlin.Boolean,kotlin.Any)(composer: https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composer, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, tracked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, block: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/ComposableLambda` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeCompilerApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#composableLambdaInstance(kotlin.Int,kotlin.Boolean,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, tracked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, block: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/ComposableLambdaN` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeCompilerApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#composableLambdaN(androidx.compose.runtime.Composer,kotlin.Int,kotlin.Boolean,kotlin.Int,kotlin.Any)( composer: https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composer, key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, tracked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, arity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, block: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html )` | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/ComposableLambdaN` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeCompilerApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#composableLambdaNInstance(kotlin.Int,kotlin.Boolean,kotlin.Int,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, tracked: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, arity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, block: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)` | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/InternalComposeApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#enableLiveLiterals()()` When called, all live literals will start to use their values backed by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/MutableState`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#identityHashCode(kotlin.Any)(instance: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Returns the hash code for the given object that is unique across all currently allocated objects. | N |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-nothing/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeCompilerApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#illegalDecoyCallException(kotlin.String)(fName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Used with decoys to stub the body of the decoy function. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<T>` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/InternalComposeApi @https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeCompilerApi <T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: T)` Constructs a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` object identified by the provided global `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)` and initialized to the provided `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/InternalComposeApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#updateLiveLiteralValue(kotlin.String,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Updates the value of a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` object that was created by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)` with the same key. | Cmn |

## Top-level properties summary

|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/InternalComposeApi @https://developer.android.com/reference/kotlin/androidx/compose/runtime/ComposeCompilerApi https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#isLiveLiteralsEnabled()` | Cmn |

## Top-level functions

### composableLambda

Cmn Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/ComposableLambda.kt+function:composableLambda) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@ComposeCompilerApi
fun composableLambda(composer: Composer, key: Int, tracked: Boolean, block: Any): ComposableLambda
```

### composableLambdaInstance

Cmn Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/ComposableLambda.kt+function:composableLambdaInstance) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@ComposeCompilerApi
fun composableLambdaInstance(key: Int, tracked: Boolean, block: Any): ComposableLambda
```

### composableLambdaN

android Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/ComposableLambdaN.jvmAndAndroid.kt+function:composableLambdaN) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@ComposeCompilerApi
fun composableLambdaN(
    composer: Composer,
    key: Int,
    tracked: Boolean,
    arity: Int,
    block: Any
): ComposableLambdaN
```

### composableLambdaNInstance

android Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/ComposableLambdaN.jvmAndAndroid.kt+function:composableLambdaNInstance) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@ComposeCompilerApi
fun composableLambdaNInstance(key: Int, tracked: Boolean, arity: Int, block: Any): ComposableLambdaN
```

### enableLiveLiterals

Cmn Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/LiveLiteral.kt+function:enableLiveLiterals) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@InternalComposeApi
fun enableLiveLiterals(): Unit
```

When called, all live literals will start to use their values backed by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/MutableState`.

Caution: This API is intended to be used by tooling only. Use at your own risk.

### identityHashCode

N Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/System.native.kt+function:identityHashCode)

```
fun identityHashCode(instance: Any?): Int
```

Returns the hash code for the given object that is unique across all currently allocated objects. The hash code for the null reference is zero.

Can be negative, and near Int.MAX_VALUE, so it can overflow if used as part of calculations. For example, don't use this:

```kotlin
val comparison = identityHashCode(midVal) - identityHashCode(leftVal)
if (comparison < 0) ...
```

Use this instead:

```kotlin
if (identityHashCode(midVal) < identityHashCode(leftVal)) ...
```

### illegalDecoyCallException

Cmn Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/Decoy.kt+function:illegalDecoyCallException) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@ComposeCompilerApi
fun illegalDecoyCallException(fName: String): Nothing
```

Used with decoys to stub the body of the decoy function. Any call to this function at runtime indicates compiler error, as all calls to decoys should be compiled out.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` |   |

### liveLiteral

Cmn Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/LiveLiteral.kt+function:liveLiteral) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@InternalComposeApi
@ComposeCompilerApi
fun <T : Any?> liveLiteral(key: String, value: T): State<T>
```

Constructs a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` object identified by the provided global `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)` and initialized to the provided `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)`. This value may then be updated from tooling with the `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#updateLiveLiteralValue(kotlin.String,kotlin.Any)` API. Only a single `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` object will be created for any given `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)`.

Caution: This API is intended to be used by tooling only. Use at your own risk.

### updateLiveLiteralValue

Cmn Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/LiveLiteral.kt+function:updateLiveLiteralValue) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@InternalComposeApi
fun updateLiveLiteralValue(key: String, value: Any?): Unit
```

Updates the value of a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State` object that was created by `https://developer.android.com/reference/kotlin/androidx/compose/runtime/internal/package-summary#liveLiteral(kotlin.String,kotlin.Any)` with the same key.

## Top-level properties

### isLiveLiteralsEnabled

Cmn Artifact: [androidx.compose.runtime:runtime](https://developer.android.com/jetpack/androidx/releases/compose-runtime) [View Source](https://cs.android.com/search?q=file:androidx/compose/runtime/internal/LiveLiteral.kt+symbol:isLiveLiteralsEnabled) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.0.0)

```
@InternalComposeApi
@ComposeCompilerApi
val isLiveLiteralsEnabled: Boolean
```