next-scroll-restore

1.0.1 • Public • Published

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

/next-scroll-restore/

    Package Sidebar

    Install

    npm i next-scroll-restore

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • mizchi