Skip to content

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

Description

@Kusou1

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?

Activity

  1. molefrog commented on Sep 2, 2024

    @molefrog
    Owner

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

  2. added
    unclearProbably needs more context, or can't be reproduced
    on Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    unclearProbably needs more context, or can't be reproduced

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions