Om and Reagent have different approaches to managing state, but that analogy is 
pretty close.  If you are partial to Om, look into Ian Eslick's derive library, 
which he discusses in another recent thread on this group.  It takes a similar 
approach to what I've described using Om and NativeStore (although he says it 
could be adapted to Datascript easily).  Without something like derive, this 
approach would be difficult with Om, so it's great to see someone working in 
that area.  That's one of the main reasons I went with reagent initially, but I 
really like it and will stick with it.  I do think derive could be useful with 
reagent as well, I just haven't had time to dig into it.

Also, I realized after I posted  I didn't answer your original question, how to 
manage State changes that happen outside your ui components.  With the 
datascript/bound-query approach this is trivial.  I have components listening 
for server changes that simply transact against the Datascript db whenever 
changes occur, then those changes are reflected in the bound queries and the ui 
is updated if needed.  I'm using Firebase for this particular mobile app, but 
it would work just as well with sente, raw web sockets, or even Ajax calls.

-- 
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