question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade @reach/router to react-router@6

See original GitHub issue

Storybook uses reach/router in a few critical place places. Reach router is EOL, and unfortunately not receving much attention today (like react 17 support for the time being).

The long term path forward for reach/router is react-router6. The short term path forward is react 17 support for reach.

I attempted to start a PR to port over to react-router6, but unfortunately after a few hours determined its a bit more involved than I am capable with the context I currently posses (subtle changes like navigate coming from a hook instead of an export now, type changes and the use of definitely typed, existing storybook workarounds and wrappers for reach/router etc).

I’m opening this issue to raise awareness of upstream changes that will probably need to be addressed here at some point.

Relavant links:

Reach Router and it’s sibling project React Router are merging as React Router v6. In other words, Reach Router v2 and React Router v6 are the same. There is more information on the maintainers website. –reach.tech/router/

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:61
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

16reactions
shilmancommented, Oct 25, 2021

w00t!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-beta.20 containing PR #16440 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there’s still more to do.

16reactions
ndelangencommented, Oct 20, 2021

going to attempt to migrate to react-router

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading from v5 v6.6.1 - React Router
Upgrade to React Router v6 · Upgrade all <Switch> elements to <Routes> · Relative Routes and Links · Advantages of <Route element> ·...
Read more >
How to upgrade React Router in 4 steps - InDepth.Dev
How to upgrade React Router in 4 steps. React-router version 6 was released and this is quite important because react-router is one of...
Read more >
React-Router Guide: Migrating From React-Router V5 to ...
React Router V6 is a major update to the popular router library. In this article, we'll walk through the migration process.
Read more >
Upgrading React Router From V5 to V6 - DEV Community ‍ ‍
N.B You still have to import BrowserRouter from react-router-dom to wrap your root app component. And also only Route component can be a...
Read more >
Upgrade to React Router 6 - Techiediaries
There are two methods for upgrading from React Router v5 to v6: starting from scratch or updating an existing project to utilize React...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found