Skip to content
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

Does total rerender for route with react-router custom history when scrolling sections #48

Open
tchock opened this issue Jul 5, 2018 · 1 comment · May be fixed by #49
Open

Does total rerender for route with react-router custom history when scrolling sections #48

tchock opened this issue Jul 5, 2018 · 1 comment · May be fixed by #49

Comments

@tchock
Copy link

tchock commented Jul 5, 2018

What I do:
I am using a custom history (but still using the browser history) in react-router and scroll through sections.

What I see:
It re-mounts the route component because react-router handles this as a complete route change causing jumping to the top of the page.

What I expect:
The hash should change, but the route should not be re-rendered.

Possible solution:
passing a custom hash update function to the ScrollableAnchor component that will handle the hash change in a custom matter (using the history prop that react-router provides).

@tchock tchock linked a pull request Jul 5, 2018 that will close this issue
@moritzmock
Copy link

@tchock I have the same problem as you, so I hope someone (@gabergg , @bjacobel, @Marcel-G, @savtwo) can check this pull request!

Thank you in advance
mmock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants