HenrikJoreteg / redux-bundler

Compose a Redux store out of smaller bundles of functionality.
https://reduxbundler.com
583 stars 46 forks source link

Enhance url bundle to be able to not reset window scroll when necessary #46

Closed abuinitski closed 5 years ago

abuinitski commented 5 years ago

Currently on any doUpdateUrl window scroll position resets to top.

This is not always a desired behavior when you try to tie up some internal page navigation to routes.

Example: an app has some tabs in one of it's panes. I want to tie currently selected tab to a path variable so copy-pasting page URL would always open a correct tab. But when switching tabs while working with an app, resetting page scroll to top when changing current tab breaks user experience.

Another example would be when you are creating a landing site that you want to make a bit more interesting for search engines by enabling SSR and making tabs look like they are actually different pages (but you need to scroll some illustrations to get to the tabs). Again need to tie a tab to an url, but don't want the screen to jump when switching them.