Package io.kvision.redux

Predictable state container based on Redux library.

Types

ActionCreator
Link copied to clipboard
typealias ActionCreator<A, S> = (Dispatch<A>, GetState<S>) -> Unit
Dispatch
Link copied to clipboard
typealias Dispatch<A> = (A) -> Unit
GetState
Link copied to clipboard
typealias GetState<S> = () -> S
RAction
Link copied to clipboard
interface RAction
ReducerFun
Link copied to clipboard
typealias ReducerFun<S, A> = (S, A) -> S
ReduxStore
Link copied to clipboard
class ReduxStore<S : Any, A : RAction>(reducer: ReducerFun<S, A>, initialState: S, middlewares: Middleware<S>) : ObservableState<S>
A class implementing redux pattern backed by the Redux Kotlin library.

Functions

createReduxStore
Link copied to clipboard
fun <S : Any, A : RAction> createReduxStore(reducer: ReducerFun<S, A>, initialState: S, vararg middlewares: Middleware<S>): ReduxStore<S, A>
An inline helper function for creating Redux store.