Skip to content

Commit d06f3f5

Browse files
authored
Merge pull request #2693 from pongbao/patch-1
Fixes typo in Passing Event Handlers
2 parents 5f718cb + 09fd152 commit d06f3f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/1/en/part1d.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,9 +1029,9 @@ const App = (props) => {
10291029
return (
10301030
<div>
10311031
{value}
1032-
<Button handleClick={setToValue(1000)} text="thousand" /> // highlight-line
1033-
<Button handleClick={setToValue(0)} text="reset" /> // highlight-line
1034-
<Button handleClick={setToValue(value + 1)} text="increment" /> // highlight-line
1032+
<Button handleClick={() => setToValue(1000)} text="thousand" /> // highlight-line
1033+
<Button handleClick={() => setToValue(0)} text="reset" /> // highlight-line
1034+
<Button handleClick={() => setToValue(value + 1)} text="increment" /> // highlight-line
10351035
</div>
10361036
)
10371037
}

0 commit comments

Comments
 (0)