Skip to content

Preserve components between routes #225

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
alexkirsz opened this issue Aug 25, 2014 · 4 comments
Closed

Preserve components between routes #225

alexkirsz opened this issue Aug 25, 2014 · 4 comments

Comments

@alexkirsz
Copy link

Currently, handler components are given a key relative to their route's path, which means that you can't use react's diff algorithm between handlers.

However, I'd like to preserve some components between routes. In my case, a sidebar that only changes some of its content between two routes.

@alexkirsz
Copy link
Author

Whelp, duplicate of #97.

@ryanflorence
Copy link
Member

yeah, this is changing asap. for now you can <this.props.activeRouteHandler key="blah"/> to use the same key between sibling routes.

@gaearon
Copy link
Contributor

gaearon commented Aug 29, 2014

I have

<this.props.activeRouteHandler key="https://github.com/rackt/react-router/issues/225" />

:-)

@ryanflorence
Copy link
Member

btw: #229 will cut a release today if I get enough time to document all the recent changes.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 25, 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

3 participants