react-router
react-router copied to clipboard
Declarative routing for React
Allow route paths to include optional segments like `/foo/:bar?`. ## Progress - [x] RFC - https://github.com/remix-run/react-router/discussions/9550 - [x] Router PR - #9650 - [x] Router PR (fixes #9650) https://github.com/remix-run/react-router/pull/9684 -...
### What is the new or updated feature that you are suggesting? We can get the current pathname through the `useLocation()` hook. I want to get the pathname for the...
This is the first step to implementing navigation blocking APIs in React Router. This only adds support in the core router for now, but it is the first step in...
### What version of React Router are you using? 6.4.5 ### Steps to Reproduce Create an app like this ```js import ReactDOM from "react-dom/client"; import { createBrowserRouter, RouterProvider, useFetcher, }...
### What version of React Router are you using? 6.4.0 ### Steps to Reproduce I modified the Deferred example app: https://stackblitz.com/edit/github-roj5bp?file=src/routes.tsx 1. Open sample above 2. Open dev tools 3....
### What version of React Router are you using? 6.4.4 ### Steps to Reproduce Create a hook using useSearchParams with a default initialization like ``` export function useSearch () {...
### What version of React Router are you using? 6.4.3 ### Steps to Reproduce Launch `examples/ssr-data-router` with `npm run dev`. Open it in browser and either click Refresh/Stop browser button...
Pointed to `main` just for now, need to check on timing of the next minor or if this should go as a patch Closes https://github.com/remix-run/remix/issues/4791
### What is the new or updated feature that you are suggesting? ```typescript interface RouterState { location: Location; params: Params; } interface RoutesProps { children?: React.ReactNode; location?: Partial | string;...