Skip to content

Supports for router.refresh, router.replace, router.back, and router.forward (only router.push is handled today) #135

@Ahmad-Alkaf

Description

@Ahmad-Alkaf

Hey guys, what a great package!

I find it great that nextjs-toploader supports the Next.js push router, because modern Next.js apps use the router API frequently, and I suggest extending the support to include all Next.js router API, especially router.replace() (for query-param updates) and router.replace() for auth redirects.

Without loader support, the UX feels inconsistent, and developers do workarounds.

I’m happy to open a PR with the changes, just let me know!
I think supporting other router API will be by listening to all router navigation methods and firing the same start / complete handlers used for push.

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