Skip to content

Commit ab6a6f0

Browse files
committed
chore: format
1 parent c63e131 commit ab6a6f0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

docs/hooks/use-revalidator.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ Initiates a revalidation.
3939

4040
```tsx
4141
function useLivePageData() {
42-
const revalidator = useRevalidator()
42+
const revalidator = useRevalidator();
4343

4444
useInterval(() => {
45-
if (revalidator.state === 'idle') {
46-
revalidator.revalidate()
45+
if (revalidator.state === "idle") {
46+
revalidator.revalidate();
4747
}
48-
}, 5000)
48+
}, 5000);
4949
}
5050
```
5151

52-
See [here](https://overreacted.io/making-setinterval-declarative-with-react-hooks/) for a sample `useInterval` implementation.
52+
See [here][here] for a sample `useInterval` implementation.
5353

5454
## Notes
5555

@@ -62,3 +62,4 @@ If a navigation happens while a revalidation is in flight, the revalidation will
6262
[form-component]: ../components/form
6363
[use-fetcher]: ./use-fetcher
6464
[use-submit]: ./use-submit
65+
[here]: https://overreacted.io/making-setinterval-declarative-with-react-hooks

docs/start/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ You could certainly do this as a controlled component. You will have more synchr
12101210
<summary>Expand this to see what it would look like</summary>
12111211

12121212
```tsx filename=app/root.tsx lines=[2,9-10,12-16,30-33,36-37]
1213-
// We no longer need useEffect
1213+
// We no longer need useEffect
12141214
import { useState } from "react";
12151215

12161216
// existing imports & exports

0 commit comments

Comments
 (0)