react-router
react-router copied to clipboard
Declarative routing for React
### What version of React Router are you using? 6.25.1 ### Steps to Reproduce I encountered an issue where the `useNavigate` hook causes unnecessary re-renders in sibling components when the...
Closes https://github.com/remix-run/react-router/issues/11911
### What version of React Router are you using? react-router-dom 6.26.1 ### Steps to Reproduce Use lazy loading for the page. ```js lazy: () => import("./pages"), ``` In browsers that...
Fixes https://github.com/remix-run/react-router/issues/11902
### What version of React Router are you using? 6.26.2 ### Steps to Reproduce 1. Render a `` component that potentially receives a custom `location` prop, initially `null`. 2. Perform...
### What version of React Router are you using? @6.26.1 ### Steps to Reproduce  ### Expected Behavior ``` matchPath('/one/:mode?/two',`/onexmode/two`) ``` should return null ### Actual Behavior return matched
Stabilize `dataStrategy`/`patchRoutesOnNavigation` and associated APIs Did this via `sed` for ease of replaying it on the dev branch for v7 as well: ```sh for F in $(find . -type f...
Note: 2 of these changes have since been made in Remix v2 so we can remove the first 2 commits from here once they are brought over: * https://github.com/remix-run/remix/pull/9695 *...
Added support and tests for optional static segments in matchPath. According to the [docs ](https://reactrouter.com/en/main/route/route#optional-segments) they should be supported but were not. Before the fix the pattern "/user/admin?" would match...