android-components / mozilla.components.lib.state

Package mozilla.components.lib.state

Types

Name Summary
Action interface Action
Generic interface for actions to be dispatched on a Store.
State interface State
Generic interface for a State maintained by a Store.
Store open class Store<S : State, A : Action>
A generic store holding an immutable State.

Exceptions

Name Summary
StoreException class StoreException : Exception
Exception for otherwise unhandled errors caught while reducing state or while managing/notifying observers.

Type Aliases

Name Summary
Observer typealias Observer<S> = (S) -> Unit
Listener called when the state changes in the Store.
Reducer typealias Reducer<S, A> = (S, A) -> S
Reducers specify how the application’s State changes in response to Actions sent to the Store.