Skip to content

Commit 1c22bbb

Browse files
authored
Merge pull request #9079 from marmelab/fix-reactrouter-doc-links
[Doc] Fix react-router outdated doc links
2 parents 589b530 + 69dd1c6 commit 1c22bbb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/CustomRoutes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ title: "The CustomRoutes Component"
55

66
# `<CustomRoutes>`
77

8-
Lets you define custom pages in your react-admin application, using [react-router-dom](https://reactrouter.com/docs/en/v6/api#routes-and-route) `<Routes>` elements.
8+
Lets you define custom pages in your react-admin application, using [react-router-dom](https://reactrouter.com/en/6/start/concepts#defining-routes) `<Routes>` elements.
99

1010
## Usage
1111

12-
To register your own routes, pass one or several `<CustomRoutes>` elements as children of `<Admin>`. Declare as many [react-router-dom](https://reactrouter.com/docs/en/v6/api#routes-and-route) `<Route>` as you want inside them.
12+
To register your own routes, pass one or several `<CustomRoutes>` elements as children of `<Admin>`. Declare as many [react-router-dom](https://reactrouter.com/en/6/start/concepts#defining-routes) `<Route>` as you want inside them.
1313
Alternatively, you can add your custom routes to resources. They will be available under the resource prefix.
1414

1515
```jsx
@@ -41,7 +41,7 @@ Now, when a user browses to `/settings` or `/profile`, the components you define
4141

4242
## `children`
4343

44-
`children` of the `<CustomRoutes>` component must be `<Route>` elements from [react-router-dom](https://reactrouter.com/docs/en/v6/api#routes-and-route), and map a path with a custom element.
44+
`children` of the `<CustomRoutes>` component must be `<Route>` elements from [react-router-dom](https://reactrouter.com/en/6/start/concepts#defining-routes), and map a path with a custom element.
4545

4646
```jsx
4747
// in src/App.js

docs/Routing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default App;
125125

126126
## Using A Custom Router
127127

128-
By default, react-admin creates a [HashRouter](https://reactrouter.com/docs/en/v6/api#hashrouter). The hash portion of the URL (i.e. `#/posts/123` in the example) contains the main application route. This strategy has the benefit of working without a server, and with legacy web browsers.
128+
By default, react-admin creates a [HashRouter](https://reactrouter.com/en/6/router-components/hash-router#hashrouter). The hash portion of the URL (i.e. `#/posts/123` in the example) contains the main application route. This strategy has the benefit of working without a server, and with legacy web browsers.
129129

130130
But you may want to use another routing strategy, e.g. to allow server-side rendering. React-router offers various Router components to implement such routing strategies. If you want to use a different router, simply wrap it around your app. React-admin will detect that it's already inside a router, and skip its own router.
131131

0 commit comments

Comments
 (0)