File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Used to render promise values with automatic error handling.
29
29
``` tsx
30
30
import { Await , useLoaderData } from " react-router" ;
31
31
32
- export async function loader() {
32
+ export function loader() {
33
33
// not awaited
34
34
const reviews = getReviews ();
35
35
// awaited (blocks the transition)
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ title: RouterProvider
5
5
# RouterProvider
6
6
7
7
<!--
8
- ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
8
+ ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
9
9
10
10
Thank you for helping improve our documentation!
11
11
@@ -32,17 +32,14 @@ import { createRoot } from "react-dom/client";
32
32
33
33
const router = createBrowserRouter (routes );
34
34
createRoot (document .getElementById (" root" )).render (
35
- <RouterProvider router = { router } />,
35
+ <RouterProvider router = { router } />
36
36
);
37
37
```
38
38
39
39
## Signature
40
40
41
41
``` tsx
42
- function RouterProvider({
43
- router ,
44
- flushSync : reactDomFlushSyncImpl ,
45
- }: RouterProviderProps ): React .ReactElement ;
42
+ function RouterProvider({ router , flushSync : reactDomFlushSyncImpl , }: RouterProviderProps ): React .ReactElement
46
43
```
47
44
48
45
## Props
@@ -57,7 +54,7 @@ The [`ReactDOM.flushSync`](https://react.dev/reference/react-dom/flushSync)
57
54
implementation to use for flushing updates .
58
55
59
56
You usually don ' t have to worry about this:
60
-
61
57
- The ` RouterProvider ` exported from ` react-router/dom ` handles this internally for you
62
58
- If you are rendering in a non - DOM environment , you can import
63
59
` RouterProvider ` from ` react-router ` and ignore this prop
60
+
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ title: useLocation
5
5
# useLocation
6
6
7
7
<!--
8
- ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
8
+ ⚠️ ⚠️ IMPORTANT ⚠️ ⚠️
9
9
10
10
Thank you for helping improve our documentation!
11
11
@@ -45,9 +45,10 @@ function SomeComponent() {
45
45
## Signature
46
46
47
47
``` tsx
48
- function useLocation(): Location ;
48
+ function useLocation(): Location
49
49
```
50
50
51
51
## Returns
52
52
53
53
The current location object
54
+
You can’t perform that action at this time.
0 commit comments