Skip to content

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

Closed
yaru22 opened this issue Mar 4, 2015 · 5 comments
Closed

Question: react-router equivalent to Angular's named view? #908

yaru22 opened this issue Mar 4, 2015 · 5 comments

Comments

@yaru22
Copy link

yaru22 commented Mar 4, 2015

I understand that <RouteHandler /> is equivalent to Angular ui-router's ui-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!

@gaearon
Copy link
Contributor

gaearon commented Mar 4, 2015

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.

@apreg
Copy link

apreg commented Mar 23, 2015

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.

@gaearon
Copy link
Contributor

gaearon commented Mar 23, 2015

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.

@apreg
Copy link

apreg commented Mar 24, 2015

Thx for the info.

@ryanflorence
Copy link
Member

#1008

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants