Closed mmahalwy closed 9 years ago
Right now it doesn't seem like this would be possible. I think if we added https://github.com/yahoo/fluxible/issues/15, you would be able to have a store handle NAVIGATE_START
and execute currentRoute.handler().getUser()
. Otherwise we would need to bake the concept of handlers in to the navigateAction
in a very prescriptive way.
I was thinking about
ui-router
and it's powerful resolve feature. Curious if there is a good way to do it here.The only problem was that
require('../routes/Index')
is not the handler but something else (exports). Can handler take a function and returnrequire('../routes/Index')
?For example, index would have statics:
Then in routes:
I haven't figured out the best way yet though :(