fisshy / react-scroll

React scroll component
https://github.com/fisshy/react-scroll/blob/master/README.md
MIT License
4.36k stars 437 forks source link

Hash History save issue triggering weird back button issues #433

Closed IPradyumnaDebnath closed 4 years ago

IPradyumnaDebnath commented 4 years ago

Hash is always pushed to history and saved , Added a option for user to opt for the same.

fisshy commented 4 years ago

Thanks for the PR!

Could you provide a test-case testing the history?

christophercolumbusdog commented 4 years ago

Any update on this change? I'd really love to use the library, but the fact that it pushes a new history entry every time the hash is updated is a deal-breaker. 😢

IPradyumnaDebnath commented 4 years ago

@christophercolumbusdog Only if there is a plan to merge this PR this issue would be fixed in this package, else you can use my file code as util method and manipulate history as required. Don't use hashSpy use onSetActive method to update your hash along with this util method to update hash on link active. Hope this helps

fisshy commented 4 years ago

Merged it, sorry for the delay

IPradyumnaDebnath commented 4 years ago

@fisshy If you want you can update readme and npm description as well with this new property