kvision / pl.treksoft.kvision.redux

Package pl.treksoft.kvision.redux

Predictable state container based on Redux library.

Types

ReduxStore

class ReduxStore<S : Any, A>

A class implementing redux pattern backed by the original Redux JS library. It requires @Serializable state.

StateBinding

class StateBinding<S : Any, A, CONT : Container> : Widget

A class which binds the redux store with the given container.

Type Aliases

Dispatch

typealias Dispatch<A> = (A) -> <ERROR CLASS>

GetState

typealias GetState<S> = () -> S

Functions

createReduxStore

fun <S : Any, A> createReduxStore(reducer: <ERROR CLASS><S, A>, initialState: S, vararg middlewares: dynamic): ReduxStore<S, A>

An inline helper function for creating Redux store.