next-scroll-restore
v1.0.1
Published
This restores last scroll ammount on history.pushState and history.back
Downloads
6
Readme
next-scroll-restore
This restores last scroll ammount on history.pushState and history.back
Just wrapped with scroll-behavior. Inspired by react-router-scroll.
Example
import Router from 'next/router'
import applyScrollRestore from 'next-scroll-restore'
// Wrap original onRouteChangeComplete
applyScrollRestore({addTransitionHook: Router.onRouteChangeComplete})
TODO
- [ ] Skip
- [ ] Dog fooding
- [ ] Packaging
- [ ] Publish