I've been using get-state in my event handlers without problem, but I'm wondering if I should be concerned by not treating these in the same way I treat app-state cursors, which generally should not be read in an event handler, correct? That is, while update! and transact! are usually fine in an event handler since the data is not read, get-state obviously does read data, so is it a similar concern?
I often pass a parent component down through children so they can read certain aspects of the parent's state, hence why using get-state directly. While I pretty much always get Om errors when I try to read an app-state cursor in a handler, I never get them when reading local state. So I wonder now if I'm getting a false sense of security with this habit if it is not advised. I suppose an alternative would be to pass actual parent state values down so they are mirrored among children, rather than passing the parent owner itself. This would allow an event handler access to values without calling get-state on another component. But it seems wasteful to do so. -- 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.
