Package-level declarations
Types
Link copied to clipboard
A state-stored record that is used to hold a single record
Link copied to clipboard
class StoreScope
Functions
Link copied to clipboard
等同于使用扩展操作符
Link copied to clipboard
fun createStore(middlewares: Array<Middleware<Any, Any>> = emptyArray(), fn: StoreScope.() -> Unit): Store
A function used to construct a state Store
instance, you can easily use StoreScope.with in the tail closure function to create
a StoreRecord.
Link copied to clipboard
Redux provider, you should provide a state store to this Provider by use createStore
Link copied to clipboard
Use dispatch, Through this hook, you can easily obtain the global dispatch function
Link copied to clipboard
inline fun <A> useDispatchAsync(alias: String? = null, noinline onBefore: DispatchCallback<A>? = null, noinline onFinally: DispatchCallback<A>? = null): DispatchAsync<A>
Get a dispatch function that supports asynchronous execution. This function receives a suspend function whose return value is Action as a parameter.
Link copied to clipboard
Use selector
inline fun <T, R> useSelector(alias: String? = null, crossinline block: @DisallowComposableCalls T.() -> R): State<R>
Use selector, by pass block, you can also select part of state class,to use in your component