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/-init-.html | 30 +++++++ .../-redux-store/dispatch.html | 18 +++++ .../-redux-store/get-state.html | 15 ++++ .../-redux-store/index.html | 91 ++++++++++++++++++++++ .../-redux-store/state-serializer.html | 15 ++++ .../-redux-store/subscribe.html | 15 ++++ 6 files changed, 184 insertions(+) create mode 100644 api/pl.treksoft.kvision.redux/-redux-store/-init-.html create mode 100644 api/pl.treksoft.kvision.redux/-redux-store/dispatch.html create mode 100644 api/pl.treksoft.kvision.redux/-redux-store/get-state.html create mode 100644 api/pl.treksoft.kvision.redux/-redux-store/index.html create mode 100644 api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html create mode 100644 api/pl.treksoft.kvision.redux/-redux-store/subscribe.html (limited to 'api/pl.treksoft.kvision.redux/-redux-store') diff --git a/api/pl.treksoft.kvision.redux/-redux-store/-init-.html b/api/pl.treksoft.kvision.redux/-redux-store/-init-.html new file mode 100644 index 00000000..0c7d04f5 --- /dev/null +++ b/api/pl.treksoft.kvision.redux/-redux-store/-init-.html @@ -0,0 +1,30 @@ + + + +ReduxStore.<init> - kvision + + + +kvision / pl.treksoft.kvision.redux / ReduxStore / <init>
+
+

<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.

+

Parameters

+

+S - redux state type (@Serializable)

+

+A - redux action type

+

+reducer - a reducer function

+

+state - an initial state

+

+stateSerializer - a serializer for the state type

+

+middlewares - a list of optional Redux JS middlewares

+

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

+ + diff --git a/api/pl.treksoft.kvision.redux/-redux-store/dispatch.html b/api/pl.treksoft.kvision.redux/-redux-store/dispatch.html new file mode 100644 index 00000000..864840fe --- /dev/null +++ b/api/pl.treksoft.kvision.redux/-redux-store/dispatch.html @@ -0,0 +1,18 @@ + + + +ReduxStore.dispatch - kvision + + + +kvision / pl.treksoft.kvision.redux / ReduxStore / dispatch
+
+

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.

+ + diff --git a/api/pl.treksoft.kvision.redux/-redux-store/get-state.html b/api/pl.treksoft.kvision.redux/-redux-store/get-state.html new file mode 100644 index 00000000..bf7d9205 --- /dev/null +++ b/api/pl.treksoft.kvision.redux/-redux-store/get-state.html @@ -0,0 +1,15 @@ + + + +ReduxStore.getState - kvision + + + +kvision / pl.treksoft.kvision.redux / ReduxStore / getState
+
+

getState

+ +fun getState(): S +

Returns the current state.

+ + 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.

+
+ + diff --git a/api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html b/api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html new file mode 100644 index 00000000..ea96ec0c --- /dev/null +++ b/api/pl.treksoft.kvision.redux/-redux-store/state-serializer.html @@ -0,0 +1,15 @@ + + + +ReduxStore.stateSerializer - kvision + + + +kvision / pl.treksoft.kvision.redux / ReduxStore / stateSerializer
+
+

stateSerializer

+ +val stateSerializer: KSerializer<S> +

a serializer for the state type

+ + diff --git a/api/pl.treksoft.kvision.redux/-redux-store/subscribe.html b/api/pl.treksoft.kvision.redux/-redux-store/subscribe.html new file mode 100644 index 00000000..55376e06 --- /dev/null +++ b/api/pl.treksoft.kvision.redux/-redux-store/subscribe.html @@ -0,0 +1,15 @@ + + + +ReduxStore.subscribe - kvision + + + +kvision / pl.treksoft.kvision.redux / ReduxStore / subscribe
+
+

subscribe

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

Subscribes a client for the change state notifications.

+ + -- cgit