class ReduxStore<S : Any, A>
A class implementing redux pattern backed by the original Redux JS library.
ReduxStore(reducer: <ERROR CLASS><S, A>, initialState: S, vararg middlewares: dynamic)
Creates a Redux store with given reducer function and initial state. |
fun dispatch(action: A): <ERROR CLASS>
Dispatches a synchronous action object. fun dispatch(actionCreator: ActionCreator<dynamic, S>): <ERROR CLASS>
Dispatches an asynchronous action function. |
|
fun getState(): S
Returns the current state. |
|
fun subscribe(listener: (S) -> Unit): () -> Unit
Subscribes a client for the change state notifications. |
fun <T> Any?.createInstance(vararg args: dynamic): T
Helper function for creating JavaScript objects from dynamic constructors. |