(no title)
arthurdenture | 6 years ago
I mean, I see why it's intuitively unappealing to you, but there are perfectly good reasons for the design.
arthurdenture | 6 years ago
I mean, I see why it's intuitively unappealing to you, but there are perfectly good reasons for the design.
thatswrong0|6 years ago
jaquers|6 years ago
I'm not sure I see how obvious it is that a <Redirect/> is wrong. But that's fine, I take your point that it's not particularly intuitive.
I'm of the opinion that routing, in general, is a function of application state - and I like to manage my application state with Redux - so I will often also mix in connected-react-router [1]. This lets you do navigation w/ an imperative API [2].
[0] https://github.com/ReactTraining/react-router/tree/master/pa...
[1] https://github.com/supasate/connected-react-router
[2] https://github.com/supasate/connected-react-router/blob/mast...
Silhouette|6 years ago
That's one alternative. Another is not to try implementing behaviour that has nothing to do with rendering using a rendering library in the first place.
A horrible amount of accidental complexity has been created in the React ecosystem when people have tried to use it like a full framework. If all you have is a hammer, maybe it's time to consider using other tools as well.