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

Handle Browser Back and Forward Buttons with Custom Page Transition #470

Open
Kusou1 opened this issue Jul 22, 2024 · 1 comment
Open

Handle Browser Back and Forward Buttons with Custom Page Transition #470

Kusou1 opened this issue Jul 22, 2024 · 1 comment

Comments

@Kusou1
Copy link

Kusou1 commented Jul 22, 2024

I have a hook to handle link button clicks. When a link button is clicked, a page transition is shown and animated. After the animation completes, the location is set to the target address.

However, I have a question regarding handling the browser's back and forward buttons. When the back button is clicked, I want to:

Prevent the default event that navigates to the previous page.
Set the target address.
Animate the page transition.
After the animation completes, set the location to the target address.
Could you please provide an solution for this?

@molefrog
Copy link
Owner

molefrog commented Sep 2, 2024

Could you please share how you're implementing delayed transitions? Are you using Suspense?

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

No branches or pull requests

2 participants