Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Use Next.js pages for existing routes #262

Open
mtfranchetto opened this issue Aug 18, 2022 · 0 comments
Open

Use Next.js pages for existing routes #262

mtfranchetto opened this issue Aug 18, 2022 · 0 comments
Labels
tech-debt Legacy issues or new tools adoption

Comments

@mtfranchetto
Copy link
Contributor

Description

All the existing pages were created before introducing Next.js. To take advantage of the outstanding capabilities of Next.js we should detach the existing pages from react-router-dom and move them under the pages directory, which is where Next.js triggers the routing.

The old router is configured in this file and every route must be moved under pages.
Please refer to this Next.js guide for more info on the pages functionality.

N.B. When moving pages one thing to look out for is how path params are injected into the components: the hooks used by Next.js are different from the one used by react-router-dom.

@mtfranchetto mtfranchetto added the tech-debt Legacy issues or new tools adoption label Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tech-debt Legacy issues or new tools adoption
Projects
None yet
Development

No branches or pull requests

1 participant