summaryrefslogtreecommitdiff
path: root/api/pl.treksoft.kvision.state/bind.html
blob: 2a24ddaa09623f80302e7d16be17dd717a0f1418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>bind - kvision</title>
<link rel="stylesheet" href="../../style.css">
</HEAD>
<BODY>
<a href="../index.html">kvision</a>&nbsp;/&nbsp;<a href="index.html">pl.treksoft.kvision.state</a>&nbsp;/&nbsp;<a href="./bind.html">bind</a><br/>
<br/>
<h1>bind</h1>
(js) <a name="pl.treksoft.kvision.state$bind(pl.treksoft.kvision.state.bind.W, pl.treksoft.kvision.state.ObservableState((pl.treksoft.kvision.state.bind.S)), kotlin.Function2((pl.treksoft.kvision.state.bind.W, pl.treksoft.kvision.state.bind.S, kotlin.Unit)))"></a>
<code><span class="keyword">fun </span><span class="symbol">&lt;</span><span class="identifier">S</span><span class="symbol">, </span><span class="identifier">W</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="../pl.treksoft.kvision.core/-widget/index.html"><span class="identifier">Widget</span></a><span class="symbol">&gt;</span> <span class="identifier">W</span><span class="symbol">.</span><span class="identifier">bind</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.state$bind(pl.treksoft.kvision.state.bind.W, pl.treksoft.kvision.state.ObservableState((pl.treksoft.kvision.state.bind.S)), kotlin.Function2((pl.treksoft.kvision.state.bind.W, pl.treksoft.kvision.state.bind.S, kotlin.Unit)))/observableState">observableState</span><span class="symbol">:</span>&nbsp;<a href="-observable-state/index.html"><span class="identifier">ObservableState</span></a><span class="symbol">&lt;</span><span class="identifier">S</span><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.state$bind(pl.treksoft.kvision.state.bind.W, pl.treksoft.kvision.state.ObservableState((pl.treksoft.kvision.state.bind.S)), kotlin.Function2((pl.treksoft.kvision.state.bind.W, pl.treksoft.kvision.state.bind.S, kotlin.Unit)))/factory">factory</span><span class="symbol">:</span>&nbsp;<span class="identifier">W</span><span class="symbol">.</span><span class="symbol">(</span><span class="identifier">S</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<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">W</span></code>
<p>An extension function which binds the widget to the observable state.</p>
<h3>Parameters</h3>
<p><a name="S"></a>
<code>S</code> - the state type</p>
<p><a name="W"></a>
<code>W</code> - the widget type</p>
<p><a name="observableState"></a>
<code>observableState</code> - the state</p>
<p><a name="factory"></a>
<code>factory</code> - a function which re-creates the view based on the given state</p>
</BODY>
</HTML>