Handle Browser Back and Forward Buttons with Custom Page Transition
Nobody has claimed this yet.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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