Skip to content

Commit 438bdc2

Browse files
committed
Mention rubico in advanced state derivation
1 parent c2fd079 commit 438bdc2

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

advanced-state-derivation.code.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ const streamOf = s => {
3535
console.log("elapsed: ", v)
3636
}
3737
// You can also chain the data stream with `map`, `filter`, etc. by integrating with
38-
// wu.js (https://fitzgen.github.io/wu.js/)
38+
// rubico (https://rubico.land) or wu.js (https://fitzgen.github.io/wu.js/).
3939
})()

advanced.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h1 class="w3-padding-16 w3-xxxlarge">
114114
console.log("elapsed: ", v)
115115
}
116116
// You can also chain the data stream with `map`, `filter`, etc. by integrating with
117-
// wu.js (https://fitzgen.github.io/wu.js/)
117+
// rubico (https://rubico.land) or wu.js (https://fitzgen.github.io/wu.js/).
118118
})()
119119
</code></pre><p><a href="https://jsfiddle.net/gh/get/library/pure/vanjs-org/vanjs-org.github.io/tree/master/jsfiddle/advanced/advanced-state-derivation">Try on jsfiddle</a></p><h3 class="w3-large w3-text-red" id="conditional-state-binding"><a class="self-link" href="#conditional-state-binding">Conditional state binding</a></h3><p>In <a href="/tutorial#state-derived-prop" class="w3-hover-opacity"><code class="symbol">State</code>-derived properties</a> and <a href="/tutorial#state-derived-child" class="w3-hover-opacity"><code class="symbol">State</code>-derived child nodes</a>, it is guaranteed that the binding function will (only) be triggered when the dependency states change. This is true even for complex binding functions, who have different dependency states under different conditions.</p><p>For instance, the binding function <code class="language-js">() =&gt; cond.val ? a.val + b.val : c.val + d.val</code> will (only) be triggered by updates of state <code class="symbol">a</code>, <code class="symbol">b</code> and <code class="symbol">cond</code> if <code class="symbol">cond.val</code> is true, and will (only) be triggered by updates of state <code class="symbol">c</code>, <code class="symbol">d</code> and <code class="symbol">cond</code> if <code class="symbol">cond.val</code> is false. This can be illustrated with the code below:</p><pre><code class="language-js">const ConditionalBinding = () =&gt; {
120120
const formula = van.state("a + b")

advanced/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h1 class="w3-padding-16 w3-xxxlarge">
114114
console.log("elapsed: ", v)
115115
}
116116
// You can also chain the data stream with `map`, `filter`, etc. by integrating with
117-
// wu.js (https://fitzgen.github.io/wu.js/)
117+
// rubico (https://rubico.land) or wu.js (https://fitzgen.github.io/wu.js/).
118118
})()
119119
</code></pre><p><a href="https://jsfiddle.net/gh/get/library/pure/vanjs-org/vanjs-org.github.io/tree/master/jsfiddle/advanced/advanced-state-derivation">Try on jsfiddle</a></p><h3 class="w3-large w3-text-red" id="conditional-state-binding"><a class="self-link" href="#conditional-state-binding">Conditional state binding</a></h3><p>In <a href="/tutorial#state-derived-prop" class="w3-hover-opacity"><code class="symbol">State</code>-derived properties</a> and <a href="/tutorial#state-derived-child" class="w3-hover-opacity"><code class="symbol">State</code>-derived child nodes</a>, it is guaranteed that the binding function will (only) be triggered when the dependency states change. This is true even for complex binding functions, who have different dependency states under different conditions.</p><p>For instance, the binding function <code class="language-js">() =&gt; cond.val ? a.val + b.val : c.val + d.val</code> will (only) be triggered by updates of state <code class="symbol">a</code>, <code class="symbol">b</code> and <code class="symbol">cond</code> if <code class="symbol">cond.val</code> is true, and will (only) be triggered by updates of state <code class="symbol">c</code>, <code class="symbol">d</code> and <code class="symbol">cond</code> if <code class="symbol">cond.val</code> is false. This can be illustrated with the code below:</p><pre><code class="language-js">const ConditionalBinding = () =&gt; {
120120
const formula = van.state("a + b")

code/advanced-state-derivation.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
console.log("elapsed: ", v)
5656
}
5757
// You can also chain the data stream with `map`, `filter`, etc. by integrating with
58-
// wu.js (https://fitzgen.github.io/wu.js/)
58+
// rubico (https://rubico.land) or wu.js (https://fitzgen.github.io/wu.js/).
5959
})()
6060

6161
van.add(document.body,

jsfiddle/advanced/advanced-state-derivation/demo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const streamOf = s => {
3737
console.log("elapsed: ", v)
3838
}
3939
// You can also chain the data stream with `map`, `filter`, etc. by integrating with
40-
// wu.js (https://fitzgen.github.io/wu.js/)
40+
// rubico (https://rubico.land) or wu.js (https://fitzgen.github.io/wu.js/).
4141
})()
4242

4343
van.add(document.body,

0 commit comments

Comments
 (0)