Skip to content

Keep scroll position on update in Next.js #559

@JuroUhlar

Description

@JuroUhlar

Hi, updating the state in NextJS scrolls makes the page scroll to the top. That's usually not what you want, and I think it can be easily prevented by using router[method](newUrl, undefined, { scroll: false }) (or making the behavior configurable).

More details regarding the Next.js behavior here: vercel/next.js#20606

Thanks a lot for making this package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions