From: Alain Frisch <alain.frisch@lexifi.com>
To: Vincent Balat <vincent.balat@vblt.org>,
Vincent Balat <vincent.balat@ocsigen.org>,
ocsigen@inria.fr, OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Announce: ocaml-vdom (pre-release)
Date: Fri, 2 Dec 2016 19:18:42 +0100 [thread overview]
Message-ID: <f01ec389-43b9-d09c-cf64-0ee5aa2c8971@lexifi.com> (raw)
In-Reply-To: <CAG+nEjzGY-cNBAjRRKjgv8s4S-NP-CzoNwaPCYe1VDih5Xp0Cg@mail.gmail.com>
On 02/12/2016 17:59, Vincent Balat wrote:
>
> Using Tyxml with React is straightforward and makes your pages reactive
> almost for free.
>
> If your page contains :
> p [ text (string_of int i) ]
> you juste replace this by
> p [ R.text (React.S.map string_of int i) ]
>
> and it is automatically updated when the value of i changes ...
I'm not sure to follow: in the "Elm/vdom" approach, the original
p [ text (string_of int i) ]
has the behavior you describe: the content of the text node will always
be equal to "string_of_int i" and you don't have to do any explicit
update to achieve that. That's the beauty of the model. I guess this
could be qualified as "reactive" as well, except that the entire view is
refreshed when any part of the state change (and the vdom diffing
approach makes this viable).
-- Alain
next prev parent reply other threads:[~2016-12-02 18:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 16:52 Alain Frisch
2016-11-30 19:22 ` Yaron Minsky
2016-12-01 9:32 ` Alain Frisch
2016-12-01 22:18 ` Yaron Minsky
2016-11-30 22:46 ` Martin DeMello
2016-12-01 9:56 ` Alain Frisch
[not found] ` <CAG+nEjzO1qFfxHSMqueiKcTJyJYnREmvXhzGR7H+noBmV2oUKw@mail.gmail.com>
2016-12-02 13:41 ` Alain Frisch
2016-12-02 16:59 ` Vincent Balat
2016-12-02 18:18 ` Alain Frisch [this message]
2016-12-02 22:31 ` Yaron Minsky
2016-12-10 13:34 ` SP
[not found] ` <5db7c03d-bec8-8285-b458-82e681842dbb@zoho.com>
2016-12-05 15:55 ` Ashish Agarwal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f01ec389-43b9-d09c-cf64-0ee5aa2c8971@lexifi.com \
--to=alain.frisch@lexifi.com \
--cc=caml-list@inria.fr \
--cc=ocsigen@inria.fr \
--cc=vincent.balat@ocsigen.org \
--cc=vincent.balat@vblt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox