TypedReduxStore

open class TypedReduxStore<S : Any, A : RAction>(val store: TypedStore<S, A>) : ObservableState<S> (source)

A class implementing redux pattern backed by the Redux Kotlin library.

Parameters

S

redux state type

A

redux action type

store

a native typed redux store

Constructors

Link copied to clipboard
constructor(store: TypedStore<S, A>)

Creates a Redux store with given reducer function and initial state.

Properties

Link copied to clipboard
val store: TypedStore<S, A>

Functions

Link copied to clipboard
fun dispatch(action: A)

Dispatches a synchronous action object.

fun dispatch(actionCreator: ActionCreator<A, S>)

Dispatches an asynchronous action function.

Link copied to clipboard
open override fun getState(): S
Link copied to clipboard
open override fun subscribe(observer: (S) -> Unit): () -> Unit