Skip to content

Dynamic props to layout-component based on handler component #963

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
henit opened this issue Mar 17, 2015 · 2 comments
Closed

Dynamic props to layout-component based on handler component #963

henit opened this issue Mar 17, 2015 · 2 comments

Comments

@henit
Copy link

henit commented Mar 17, 2015

I have been looking for a solution to an app-structuring issue. I just created a post explaining the details here:

http://stackoverflow.com/questions/29092680/reactrouter-props-from-handlers-to-header

I appreciate any help.

@ryanflorence
Copy link
Member

I'd like to add multiple handlers per route so you could do something like <RouteHandler for="header"/> and be able to do the automatic view nesting with your routes in multiple sections of your UI, where right now there's only one.

You can still do what you need to do though, it just takes quite a bit of imperative code. Check out the sidebar example https://github.com/rackt/react-router/blob/master/examples/sidebar/app.js#L85.

The parent component inspects the route information and passes it as props to the sidebar, and then it responds.

@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

2 participants