1.0.1 • Published 7 years ago
next-scroll-restore v1.0.1
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