molefrog / molefrog/wouter

Handle Browser Back and Forward Buttons with Custom Page Transition

Open
#470 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

unclear
Dominant language
TypeScript
Stars
7.9k
Forks
190
Avg merge
12h 50m
Merged PRs (30d)
3

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the hook that handles link-button clicks and the router's browser-history handling; done means back and forward navigation can run the requested transition before reaching the target address.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.