I'm no expert on Reagent, and this may all seem obvious and irrelevant: 
Since the api state is in a regular atom, I assume that you don't need for 
the UI to update in response to incremental changes in the api state.  If 
you did, then it would be most convenient to use a Reagent atom for the api 
state, right--even if you don't need that functionality all of the time?  
(If you used a ratom in the api, maybe Google Closure would compile away 
the rest of Reagent, so the overhead of using a ratom instead of a Clojure 
atom wouldn't be that great?  I have no idea whether this makes sense.)

So when you want the UI to update in response to the api atom, could you 
just call a function that you pass the api atom to?  Then the only question 
is what causes this function to be called, if you want it called after an 
initial page rendering.  That depends on the situation.  I have a little 
app in which a Clojure atom is passed to a function when the user clicks on 
a button, which makes sense for my case, but probably doesn't for yours.

There might be more sophisticated answers that are better for your 
situation, but simple is always good if it works.

-- 
You received this message because you are subscribed to the Google Groups 
"Reagent-Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reagent-project+unsubscr...@googlegroups.com.
To post to this group, send email to reagent-project@googlegroups.com.
Visit this group at https://groups.google.com/group/reagent-project.
For more options, visit https://groups.google.com/d/optout.

Reply via email to