Skip to content

Commit

Permalink
chore(docs): fix useTimeoutFn example
Browse files Browse the repository at this point in the history
  • Loading branch information
develohpanda committed Aug 14, 2023
1 parent 4bfeef4 commit 5d09768
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/__docs__/migrating-from-react-use.story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ API is backwards-compatible, minus the first `isReady` return value.
In order to replicate the old functionality, you can do the following:

```javascript
const isReady = (React.useRef < boolean) | (null > false);
const isReady = React.useRef<boolean | null>(false);

Check failure on line 267 in src/__docs__/migrating-from-react-use.story.mdx

View workflow job for this annotation

GitHub Actions / Lint

Replace `React.useRef<boolean·|·null>(` with `(React.useRef·<·boolean)·|·(null·>·`

const [cancel, reset] = useTimeoutEffect(() => {
isReady.current = true;
Expand Down

0 comments on commit 5d09768

Please sign in to comment.