molefrog / molefrog/wouter

App crashes on browser native back/forward button from project pages

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

Nobody has claimed this yet.

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

Description

When navigating to a project page via an in-app link and then pressing the browser native back or forward button, the app crashes showing "An unexpected error occurred" with a minified stack trace. All in-app navigation buttons work correctly. The issue only occurs with the browser native back/forward buttons.
Route setup:
javascript






ProjectDetail uses:
javascriptconst [matched, params] = useRoute<{ slug: string }>("/projects/:slug");
const [, setLocation] = useLocation();
Any help would be greatly appreciated.

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

Start with the Route setup and ProjectDetail, especially its useRoute("/projects/:slug") and useLocation() calls. Reproduce navigation from a project page with the browser's native back and forward buttons, then verify those actions no longer show the unexpected-error screen while in-app navigation continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.