diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-03-17 01:38:43 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-03-17 01:38:43 +0100 |
commit | 5c87c4a52e95c942c413324e21034a52fff0ccb3 (patch) | |
tree | f1428d11a37ea4504d8caa897c876e7650e2206d /api/pl.treksoft.kvision.redux/-redux-store/index.html | |
parent | e992f3f13ec46cad15cc7d6982e64ffc7223eb9a (diff) | |
download | kvision-5c87c4a52e95c942c413324e21034a52fff0ccb3.tar.gz kvision-5c87c4a52e95c942c413324e21034a52fff0ccb3.tar.bz2 kvision-5c87c4a52e95c942c413324e21034a52fff0ccb3.zip |
API Documentation for KVision 0.0.30
Diffstat (limited to 'api/pl.treksoft.kvision.redux/-redux-store/index.html')
-rw-r--r-- | api/pl.treksoft.kvision.redux/-redux-store/index.html | 91 |
1 files changed, 91 insertions, 0 deletions
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 @@ +<HTML> +<HEAD> +<meta charset="UTF-8"> +<title>ReduxStore - kvision</title> +<link rel="stylesheet" href="../../../style.css"> +</HEAD> +<BODY> +<a href="../../index.html">kvision</a> / <a href="../index.html">pl.treksoft.kvision.redux</a> / <a href="./index.html">ReduxStore</a><br/> +<br/> +<h1>ReduxStore</h1> +<code><span class="keyword">class </span><span class="identifier">ReduxStore</span><span class="symbol"><</span><span class="identifier">S</span> <span class="symbol">:</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">, </span><span class="identifier">A</span><span class="symbol">></span></code> +<p>A class implementing redux pattern backed by the original Redux JS library. +It requires @Serializable state.</p> +<h3>Constructors</h3> +<table> +<tbody> +<tr> +<td> +<p><a href="-init-.html"><init></a></p> +</td> +<td> +<code><span class="identifier">ReduxStore</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/reducer">reducer</span><span class="symbol">:</span> <span class="identifier"><ERROR CLASS></span><span class="symbol"><</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">,</span> <a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">></span><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/initialState">initialState</span><span class="symbol">:</span> <a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/stateSerializer">stateSerializer</span><span class="symbol">:</span> <span class="identifier">KSerializer</span><span class="symbol"><</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">></span><span class="symbol">, </span><span class="keyword">vararg</span> <span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$<init>(((pl.treksoft.kvision.redux.ReduxStore.S, pl.treksoft.kvision.redux.ReduxStore.A)), pl.treksoft.kvision.redux.ReduxStore.S, kotlinx.serialization.KSerializer((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Array((kotlin.Any)))/middlewares">middlewares</span><span class="symbol">:</span> <span class="keyword">dynamic</span><span class="symbol">)</span></code> +<p>Creates a Redux store with given reducer function and initial state.</p> +</td> +</tr> +</tbody> +</table> +<h3>Properties</h3> +<table> +<tbody> +<tr> +<td> +<p><a href="state-serializer.html">stateSerializer</a></p> +</td> +<td> +<code><span class="keyword">val </span><span class="identifier">stateSerializer</span><span class="symbol">: </span><span class="identifier">KSerializer</span><span class="symbol"><</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">></span></code> +<p>a serializer for the state type</p> +</td> +</tr> +</tbody> +</table> +<h3>Functions</h3> +<table> +<tbody> +<tr> +<td> +<p><a href="dispatch.html">dispatch</a></p> +</td> +<td> +<code><span class="keyword">fun </span><span class="identifier">dispatch</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$dispatch(pl.treksoft.kvision.redux.ReduxStore.A)/action">action</span><span class="symbol">:</span> <a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code> +<p>Dispatches a synchronous action object.</p> +<code><span class="keyword">fun </span><span class="identifier">dispatch</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$dispatch(kotlin.Function2((kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.A, )), kotlin.Function0((pl.treksoft.kvision.redux.ReduxStore.S)), kotlin.Unit)))/action">action</span><span class="symbol">:</span> <span class="symbol">(</span><a href="../-dispatch.html"><span class="identifier">Dispatch</span></a><span class="symbol"><</span><a href="index.html#A"><span class="identifier">A</span></a><span class="symbol">></span><span class="symbol">,</span> <a href="../-get-state.html"><span class="identifier">GetState</span></a><span class="symbol"><</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">></span><span class="symbol">)</span> <span class="symbol">-></span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier"><ERROR CLASS></span></code> +<p>Dispatches an asynchronous action function.</p> +</td> +</tr> +<tr> +<td> +<p><a href="get-state.html">getState</a></p> +</td> +<td> +<code><span class="keyword">fun </span><span class="identifier">getState</span><span class="symbol">(</span><span class="symbol">)</span><span class="symbol">: </span><a href="index.html#S"><span class="identifier">S</span></a></code> +<p>Returns the current state.</p> +</td> +</tr> +<tr> +<td> +<p><a href="subscribe.html">subscribe</a></p> +</td> +<td> +<code><span class="keyword">fun </span><span class="identifier">subscribe</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.redux.ReduxStore$subscribe(kotlin.Function1((pl.treksoft.kvision.redux.ReduxStore.S, kotlin.Unit)))/listener">listener</span><span class="symbol">:</span> <span class="symbol">(</span><a href="index.html#S"><span class="identifier">S</span></a><span class="symbol">)</span> <span class="symbol">-></span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="symbol">(</span><span class="symbol">)</span> <span class="symbol">-></span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code> +<p>Subscribes a client for the change state notifications.</p> +</td> +</tr> +</tbody> +</table> +<h3>Extension Functions</h3> +<table> +<tbody> +<tr> +<td> +<p><a href="../../pl.treksoft.kvision.utils/kotlin.-any/create-instance.html">createInstance</a></p> +</td> +<td> +<code><span class="keyword">fun </span><span class="symbol"><</span><span class="identifier">T</span><span class="symbol">></span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">?</span><span class="symbol">.</span><span class="identifier">createInstance</span><span class="symbol">(</span><span class="keyword">vararg</span> <span class="identifier" id="pl.treksoft.kvision.utils$createInstance(kotlin.Any, kotlin.Array((kotlin.Any)))/args">args</span><span class="symbol">:</span> <span class="keyword">dynamic</span><span class="symbol">)</span><span class="symbol">: </span><a href="../../pl.treksoft.kvision.utils/kotlin.-any/create-instance.html#T"><span class="identifier">T</span></a></code> +<p>Helper function for creating JavaScript objects from dynamic constructors.</p> +</td> +</tr> +</tbody> +</table> +</BODY> +</HTML> |