-
Notifications
You must be signed in to change notification settings - Fork 364
Routing Support
While Om Next will not provide a standard routing solution, it should provide fundamental support to simplify the development of third party routing solutions. There are two challenges to overcome here - one is user assumptions about how Om Next is intended to be used, the other is sufficiently decomplected primitives to accomplish said goal. We should create more documentation to prevent the former and add primitives where they are missing to address the latter. Otherwise this quickly leads users to routing solution that while they may work, have sub-optimal properties.
With respect to assumptions - while users are aware of set-query!
but they might assume that queries always change state from "below". This is
fundamentally at odds with routing which is necessarily a global state
change (from "above") concern.
Instead the documentation should naturally lead users to consider
applying set-query!
to the root component to accomplish their
goal. This of course invites over-rendering but this is precisely where
Om Next can be enhanced. set-query!
could be changed to take a list
reads just like transactions.
Questions like how to propagate or modify parameters from the top-level means users have not yet seriously considered the various tools around query - the simple AST. They should be encouraged to explore the possibilities and enumerate what further helpers or additional primitives may be missing.