Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[react-router-dom] navlink, renderMatches & matchRoutes (#4425)
* [react-router-dom] drop outdated support of Navlink props `activeClassName` & `activeStyle` also improve type className & style then add tests cf. https://reactrouter.com/en/main/upgrading/v5#remove-activeclassname-and-activestyle-props-from-navlink- * [react-router-dom] Navlink prop `exact` renamed to `end` cf. https://reactrouter.com/en/main/upgrading/v5#rename-navlink-exact-to-navlink-end * [react-router-dom] Navlink's `isActive` prop has been removed `isActive` has been removed between versions 5 & 6 without notice: v5: https://v5.reactrouter.com/web/api/NavLink/isactive-func latest: https://reactrouter.com/en/main/components/nav-link#navlink * [react-router-dom] Navlink accepts render prop cf. https://reactrouter.com/en/main/components/nav-link#children * [react-router-dom] refactor `renderMatches` & `matchRoutes` types improve types to make it more precise and more close to typescript definition cf. matchRoute https://github.com/remix-run/react-router/blob/d19c2c221c9f53b8273033f31b0ee94734719f47/packages/router/utils.ts#L374 renderRoutes https://github.com/remix-run/react-router/blob/d19c2c221c9f53b8273033f31b0ee94734719f47/packages/react-router/lib/components.tsx#L630
- Loading branch information
Showing
2 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters