Package-level declarations

Types

Link copied to clipboard
data class Store(val middlewares: Array<Middleware<Any, Any>>, val records: List<StoreRecord>)
Link copied to clipboard
data class StoreRecord(val reducer: Reducer<Any, Any>, val initialState: Any, val stateType: KClass<*>, val actionType: KClass<*>, val alias: String)
Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun combineStores(vararg stores: Store): Store
Link copied to clipboard
fun createStore(middlewares: Array<Middleware<Any, Any>> = emptyArray(), fn: StoreScope.() -> Unit): Store

Create store

Link copied to clipboard
operator fun Store.plus(other: Store): Store
Link copied to clipboard
fun ReduxProvider(store: Store, content: ComposeComponent)

Redux provider, you should provide a state store to this Provider by use createStore

Link copied to clipboard
fun registerErr(target: String): Nothing
Link copied to clipboard
inline fun <A> useDispatch(alias: String? = null): Dispatch<A>

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
inline fun <T> useSelector(alias: String? = null): T

Use selector

inline fun <T, R> useSelector(alias: String? = null, block: T.() -> R): R

Use selector, by pass block, you can also select part of state class,to use in your component