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.

StateBinding

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

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

Updateable

class Updateable<S : Any, CONTENT>

A helper class for updateable redux content.

Type Aliases

ActionCreator

typealias ActionCreator<A, S> = (Dispatch<A>, GetState<S>) -> Unit

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.