# StateFactoryMarker

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/snapshots/StateFactoryMarker.kt+class:androidx.compose.runtime.snapshots.StateFactoryMarker) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-runtime#1.5.0) Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  @MustBeDocumented
  @Target(allowedTargets = [AnnotationTarget.FUNCTION])
  @Retention(value = AnnotationRetention.BINARY)
  annotation StateFactoryMarker
  ```

*** ** * ** ***

Designates a function as a factory function that produces a State object. Since State factory functions create and initialize a state, they should usually only be called once per state value initialization. This annotation causes all invocations of marked state factory functions to be checked to ensure that they are not called directly inside the body of a `https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable` function and are instead wrapped with an appropriate `https://developer.android.com/reference/kotlin/androidx/compose/runtime/remember.composable#remember(kotlin.Function0)` call.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/snapshots/StateFactoryMarker#StateFactoryMarker()()` | Cmn |

## Public constructors

### StateFactoryMarker

Cmn

```
StateFactoryMarker()
```