On Mon, Apr 21, 2014 at 12:40 PM, Sean Corfield <[email protected]> wrote:
> Most of the examples have app-state def'd at the top-level and pass that > into om/root but then it's referred to as just app (or something > domain-specific) inside components. Since I think of the top-level > component as my "application", I've found it clearer to use app-state (or > ...-state for cursors within that) instead of app. > `app` or `app-state` really only makes sense for the root component. > (and I'm torn between ...-state and ...-cursor right now because I'm not > sure whether emphasizing the difference between a cursor and a regular > piece of Clojure data is worth the extra naming distinction?) > `data`, `props`, or something more domain specific seem more appropriate to me over anything involving cursor. > Similarly, as I start to write helper functions that components call, > which are passed both app-state (or ...-state) and owner, I've found ownerto > be less than helpful and started using > self inside the component and a more descriptive name in the helper > function. For example, if my application component needs to kick off a > core.async event loop in will-mount, I'll pass app-state and self to a > helper function that will name the args [app-state application] and it > will run the go-loop. > `self` doesn't really make sense. `owner` is more accurate even if it's not clear to you yet why it's called that. 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.
