-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Question: react-router equivalent to Angular's named view? #908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is not supported now. I think it would require a big overhaul of how router works internally so I doubt that is planned for the near future. Personally I have mixed feelings about this. Do the benefits of this model outweigh added complexity in your opinion? After all, React offers a really great composition model out of the box and you can always leverage that when you want to go “more custom” than router allows in configuration. |
I'd love to see this implemented also. It would be useful in the given scenario for example: There is a main layout grid component with blocks/cells which could be named views and in the child page/component you could define into which block you want to render a given component. This way you can change your page structure anytime easily. Of course this solution presumes that your components are isolated but that's another topic. |
Yeah. From what I've heard, Relay folks want this too in order for RR to work with it. I figure the next big RR release will need to support this, but I can't give you any timeframe on this. |
Thx for the info. |
I understand that
<RouteHandler />
is equivalent to Angular ui-router'sui-view
directive. But Angular also supports named view (e.g.<div ui-view="view-name-1">
), which makes loading different components to different parts of the view easy (see https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views for more detail if you are not familiar)Does react-router have something equivalent currently? If not, is there any plan to make such feature available?
Thanks!
The text was updated successfully, but these errors were encountered: