o library

Classes

Observable<T>
Object that holds the state data.
Observer<T, U>

Functions

createStore<T, U>(T initial, Reducer<T, U> reducer) → ({Dispatch<T, U> dispatch, void Function() dispose, Observable<T> o})
Record to expose Observable and Dispatch<T, U> and void Function() to create state with provided initial.
useState<T>(T initialValue) → ({void Function() dispose, T Function() get, Observable<T> o, FutureOr<void> Function(FutureOr<T>) set, FutureOr<void> Function(FutureOr<T> (T prev)) update})
Record to expose Observable and T Function() and FutureOr<void> Function(T) and FutureOr<void> Function(T Function(T)) and void Function() to create state with provided initialValue.

Typedefs

Dispatch<T, U> = FutureOr<T> Function(U action)
Reducer<T, U> = FutureOr<T> Function(T currentState, U action)