From fb7ff5b8bf2073a8d7b78011b9edffc830dc63cb Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 26 Oct 2019 00:17:24 +0200 Subject: API documentation for KVision 2.0.0 --- .../-redux-store/index.html | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 api1/pl.treksoft.kvision.redux/-redux-store/index.html (limited to 'api1/pl.treksoft.kvision.redux/-redux-store/index.html') diff --git a/api1/pl.treksoft.kvision.redux/-redux-store/index.html b/api1/pl.treksoft.kvision.redux/-redux-store/index.html new file mode 100644 index 00000000..12e6bab4 --- /dev/null +++ b/api1/pl.treksoft.kvision.redux/-redux-store/index.html @@ -0,0 +1,78 @@ + + + +ReduxStore - kvision + + + +kvision / pl.treksoft.kvision.redux / ReduxStore
+
+

ReduxStore

+class ReduxStore<S : Any, A : RAction> +

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

+

Constructors

+ + + + + + + +
+

<init>

+
+ReduxStore(reducer: ReducerFun<S, A>, initialState: S, vararg middlewares: <ERROR CLASS><S>)
+ReduxStore(reducer: <ERROR CLASS><S, A>, initialState: S, vararg middlewares: dynamic) +

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

+
+

Functions

+ + + + + + + + + + + + + + + +
+

dispatch

+
+fun dispatch(action: A): Unit +

Dispatches a synchronous action object.

+fun dispatch(actionCreator: ActionCreator<A, S>): Unit
+fun dispatch(actionCreator: ActionCreator<dynamic, S>): <ERROR CLASS> +

Dispatches an asynchronous action function.

+
+

getState

+
+fun getState(): S +

Returns the current state.

+
+

subscribe

+
+fun subscribe(listener: (S) -> Unit): () -> Unit +

Subscribes a client for the change state notifications.

+
+

Extension Functions

+ + + + + + + +
+

createInstance

+
+fun <T> Any?.createInstance(vararg args: dynamic): T +

Helper function for creating JavaScript objects from dynamic constructors.

+
+ + -- cgit