I'd like to add to this, that when I started learning Om it was totally
unclear for me what 'om/root' is and in what context it should be used. I
mean I was not sure whether it represents a one complex component or it
represents a subsection of an app or whatever else. And om/root
documentation only describes what parameters are, and not what this
function is doing.
So I was missing some guidelines on structuring my app for the beginner.

Now I kinda think that this has to do with the fact that Om is modeled on
top of React and this terminology is also inherited from it, while I didn't
know React at all, I wanted to learn Om-only side of things :)
Current Om wiki is great source of documentation, but some more guides
wouldn't hurt, I think that's now the task for us as the community - to
create some PRs with doc updates. I personally do not feel like I am an
experienced user (still an explorer), but when I do, I'll try to help.


On 21 April 2014 20:40, Sean Corfield <[email protected]> wrote:

> Many of the examples for Om use the arguments [app owner] for component
> functions. After playing with Om for about a month and building more and
> more complex examples, I found that these names caused confusion for me.
>
> 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.
>
> (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?)
>
> 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.
>
>
> Are other folks following the Om examples' lead of app and owner, or are
> you adopting distinct naming? (and if so, what sort of things?)
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
>
>
>

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