Closed tj closed 8 years ago
Just make the route state like everything else :P
navigate
actionWelcome to the weird world of front-end haha
It is lovely haha. I haven't dug into any of the routers yet but I'm assuming they add some sort of value, or just more weird abstractions haha. I'm way past the days of trying to have elegant front-end, I just want to get shit in there and work on real things
Exactly. It's impossible to make it really nice. Everything sucks.
My preference on this is to store only the url itself in state, and materialize everything from that as you render. So you have some high-level router component that takes the current url as a prop, parses it, and returns the correct view. This has the additional benefit of nesting and composing simply.
Something like enroute is good for that.
Yea that sounds like a good approach to me too, I'll take a peek
That sounds like a problem that react-router
has already solved. I think for a boilerplate repo it would be the best choice for routing since its essentially the de-facto standard for routing with react. As far as redux routing integration, redux-simple-router
is a good choice in my experience.
another vote here for react-router
to manage the actual business of routing and redux-simple-router
to expose it to your state tree. I think redux-simple-router is a very simple layer to add on top that only does what you'd expect.
redux-simple-router + react-router ftw
+1 to what @gaearon @VinSpee, and @Aweary said.
page.js is cool but it doesn't solve nested UIs so you have to do it on your own. Nested routing is requirement for pretty much any modern app. This is why I like react-router.
haha yea agreed, page is a little dated, anything that integrates directly with react is :+1: just stuff you'd have to do anyway
While we're at it check out RR 2.0 beta API. It's way more straightforward and fixes rough edges of 1.x.
Yes finally
Too many to choose from wtf, try a few and add one
https://github.com/rackt/redux-simple-router