We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
initialCount
1 parent 92d96a3 commit b5fa1dfCopy full SHA for b5fa1df
content/docs/hooks-reference.md
@@ -54,7 +54,7 @@ function Counter({initialCount}) {
54
return (
55
<>
56
Count: {count}
57
- <button onClick={() => setCount(0)}>Reset</button>
+ <button onClick={() => setCount(initialCount)}>Reset</button>
58
<button onClick={() => setCount(prevCount => prevCount + 1)}>+</button>
59
<button onClick={() => setCount(prevCount => prevCount - 1)}>-</button>
60
</>
0 commit comments