import Intro from '/docs/snippets/breaking-change-page-intro.md'
import MigrationIntro from '/docs/snippets/breaking-change-page-migration-intro.md'
Strapi users react-router-dom v6#
Strapi 5 uses v6. This impacts the links added to settings or to the menu using the Admin Panel API.
Breaking change description#
In Strapi v4
- Strapi v4 uses react-router-dom v5.
- When adding settings or menu links, the
toproperty is an absolute path.
In Strapi 5
- Strapi v5 uses react-router-dom v6.
- When adding settings or menu links, the
toproperty should now be a relative path.
Migration#
Notes#
- The official React Router documentation explains .
- Absolute paths for menu or settings links are still supported but should yield a warning.
Manual procedure#
This breaking change should be handled by a codemod (see the ).
Ensure that links added to settings or to the menu links using the Admin Panel API use relative paths.