Store

interface Store<out State, in Action : Any>

A store that holds a state. The only way to change the state is to dispatch an action.

Do not implement this interface directly. New methods or properties might be added to this interface in the future. Use the Store() function to create a Store.

Properties

Link copied to clipboard
abstract val state: StateFlow<State>

A StateFlow of the current state.

Functions

Link copied to clipboard
abstract fun dispatch(action: Action)

Dispatches an action.