You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to talk about the ramifications of upgrading to React Router 4 on our recommended architecture.
Background
In the past we've used the route manifest in React Router 3 as a way to "wireframe out" the structure of our apps. Each route gets a presenter, that presenter gets a view, etc
It requires you to build a static route hierarchy up front, which can make changes hard later
Why we're talking about this
React Router 4 keeps routing within components. Instead of a route manifest, you use routing components within your normal application component tree. For example, a sidebar presenter in Microcosm might look like:
So there's not a hard distinction between controlling presenters and passive views. This is okay. In our apps, we've started to see benefits from using presenters only where they are needed, rather than having a structure that crams presenters in as default "containers" and views for the sake of consistency...
What to do about it
Should we drop the "presenters" directory, and just have "views"?
We need to talk about the ramifications of upgrading to React Router 4 on our recommended architecture.
Background
In the past we've used the route manifest in React Router 3 as a way to "wireframe out" the structure of our apps. Each route gets a presenter, that presenter gets a view, etc
This has mostly worked well, but there's a couple of issues I've noticed:
Why we're talking about this
React Router 4 keeps routing within components. Instead of a route manifest, you use routing components within your normal application component tree. For example, a sidebar presenter in Microcosm might look like:
So there's not a hard distinction between controlling presenters and passive views. This is okay. In our apps, we've started to see benefits from using presenters only where they are needed, rather than having a structure that crams presenters in as default "containers" and views for the sake of consistency...
What to do about it
See https://reacttraining.com/react-router/web/api/Router
The text was updated successfully, but these errors were encountered: