I'm new to om.next (and to clojurescript), and I have the following question. I can only get the root component to be invoked with the reconciler (i.e. have its query method invoked); every other component seems to need to be invoked with props and with om/factory
. I think I'm missing something.
I am attempting to create a todo list app (100 points for originality!), with a filter to show completed/incomplete/all items. If my TodoList
component is the root component, I can invoke it with query: [:todos]
with no problem. I'd like to have a different root component, and also have a Filter
component that goes through the reconciler.
Possible options I can see:
have multiple om/add-root! calls (this prevents us from having nested components that use the reconciler, and is not the pattern that I see in tutorials)
wrap everything in a global component and pass state down through props. But the examples make read a multimethod, which doesn't jive with this approach.
Is this possible? Thank you!