Skip to content

Commit 3b6e6ef

Browse files
committed
Quote a_style function name
1 parent ae89ec2 commit 3b6e6ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_drafts/react-example-todomvc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ This first example explains how the CSS style of a HTML node becomes reactive ([
5353
R.Html5.a_style (React.S.map css_visibility r)
5454
{% endhighlight %}
5555

56-
We use the `Tyxml_js` module to safely build the HTML code. The first thing to note is that we use its `R.Html5` submodule instead of the `Html5` one. `R.Html5` is simply the Reactive counterpart of `Html5`. As it's a reactive attribute, the a_style function expects a reactive signal as its argument. Here we use `React.S.map` which have the signature `('a -> 'b) -> 'a React.signal -> 'b React.signal`. This map function takes as its first argument a function named `css_visibility`:
56+
We use the `Tyxml_js` module to safely build the HTML code. The first thing to note is that we use its `R.Html5` submodule instead of the `Html5` one. `R.Html5` is simply the Reactive counterpart of `Html5`. As it's a reactive attribute, the `a_style` function expects a reactive signal as its argument. Here we use `React.S.map` which have the signature `('a -> 'b) -> 'a React.signal -> 'b React.signal`. This map function takes as its first argument a function named `css_visibility`:
5757

5858
{% highlight ocaml %}
5959
let css_visibility m =

0 commit comments

Comments
 (0)