On Sun, Jan 12, 2014 at 8:50 AM, Peter Taoussanis <[email protected]>wrote:

> It's been my experience that this kind of snapshotting is generally
> trivial (order of a few lines), quite simple, and usually something I'd
> want to be doing manually anyway since usually not _all_ state is or should
> be subject to undo and/or tracking (non user-induced state pushed from the
> server, for example).
>

In Om you will be able to pick what you want to snapshot. But I'm planning
on providing a higher level api which will provide some interesting
facilities :)


> Anyway, I do find the flexibility of choosing how+where state is stored to
> be a plus in practice, especially during prototyping stages and when
> migrating from an existing code base.
>

You have the same flexibility in Om. Cloact just provides more admittedly
nice sugar.


> > The other option in Cloact is to use a single atom approach, but then
> you have mixed universe of snapshottable components and ones which aren't.
>
> I'm quite happy with having that flexibility since it allows me to make
> trade-offs as/when I need them.
>

Then I won't use your components :)

> Also a model that emphasizes local state like this, which React suffers
> from as well, can not leverage as many rendering optimizations in the
> future as Om.
>
> I'm curious what you have in mind here and why you're describing it as
> "local" state. If I've understood React's diff algo correctly, it seems so
> long as we're handling our dirty/not-dirty marking accurately, we're
> subject to "all" optimisations, always. Since the atoms are immutable and
> their comparisons done as identity checks, I'm not seeing how much room
> there'd be for improvement driven by ClojureScript's side?
>

If you read up on React's diff'ing algorithm you'll see there are some
missed opportunities. In Om we will always know what's changed and
precisely how it's related to what the user sees so we can drive React's
diff'ing algorithm much better.

David

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to