Skip to content

Commit 65d297e

Browse files
authored
fix: typo in challenge solution (#7816)
1 parent 0b68054 commit 65d297e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/learn/removing-effect-dependencies.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ export default function Timer() {
12411241
12421242
</Sandpack>
12431243
1244-
Instead of reading `count` inside the Effect, you pass a `c => c + 1` instruction ("increment this number!") to React. React will apply it on the next render. And since you don't need to read the value of `count` inside your Effect anymore, so you can keep your Effect's dependencies empty (`[]`). This prevents your Effect from re-creating the interval on every tick.
1244+
Instead of reading `count` inside the Effect, you pass a `c => c + 1` instruction ("increment this number!") to React. React will apply it on the next render. And since you don't need to read the value of `count` inside your Effect anymore, you can keep your Effect's dependencies empty (`[]`). This prevents your Effect from re-creating the interval on every tick.
12451245
12461246
</Solution>
12471247

0 commit comments

Comments
 (0)