From 5c87c4a52e95c942c413324e21034a52fff0ccb3 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 17 Mar 2019 01:38:43 +0100 Subject: API Documentation for KVision 0.0.30 --- .../-redux-store/index.html | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 api/pl.treksoft.kvision.redux/-redux-store/index.html (limited to 'api/pl.treksoft.kvision.redux/-redux-store/index.html') diff --git a/api/pl.treksoft.kvision.redux/-redux-store/index.html b/api/pl.treksoft.kvision.redux/-redux-store/index.html new file mode 100644 index 00000000..0c8f9a80 --- /dev/null +++ b/api/pl.treksoft.kvision.redux/-redux-store/index.html @@ -0,0 +1,91 @@ + + + +ReduxStore - kvision + + + +kvision / pl.treksoft.kvision.redux / ReduxStore
+
+

ReduxStore

+class ReduxStore<S : Any, A> +

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

+

Constructors

+ + + + + + + +
+

<init>

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

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

+
+

Properties

+ + + + + + + +
+

stateSerializer

+
+val stateSerializer: KSerializer<S> +

a serializer for the state type

+
+

Functions

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

dispatch

+
+fun dispatch(action: A): <ERROR CLASS> +

Dispatches a synchronous action object.

+fun dispatch(action: (Dispatch<A>, GetState<S>) -> Unit): <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