Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support replacing route on redirect #3072

Merged
merged 3 commits into from
May 16, 2024
Merged

Support replacing route on redirect #3072

merged 3 commits into from
May 16, 2024

Conversation

masenf
Copy link
Collaborator

@masenf masenf commented Apr 11, 2024

Support next/router .replace interface to change page without creating a history entry.

Copy link
Collaborator

@Lendemor Lendemor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no issue with the implementation.

I'm just not sure when/where this will be needed? for redirecting from login page maybe?

@masenf
Copy link
Collaborator Author

masenf commented May 16, 2024

for redirecting from login page maybe?

Precisely.

There are other scenarios as well, like using URL-based state, but not wanting the back button to transition between those states.

@masenf masenf merged commit bc6f0f7 into main May 16, 2024
47 checks passed
@masenf masenf deleted the masenf/redirect-replace branch May 16, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants