Skip to content

Commit

Permalink
Update hooks.md. (preactjs#565)
Browse files Browse the repository at this point in the history
Patch a small typo in the class-based example's `increment` method.
  • Loading branch information
doubleswirve authored Mar 6, 2020
1 parent 973f80b commit 898d7da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/en/guide/v10/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Counter extends Component {
};

increment = () => {
this.setState(prev => ({ value: prev.value +1 })
});
this.setState(prev => ({ value: prev.value +1 }));
};

render(props, state) {
return (
Expand Down

0 comments on commit 898d7da

Please sign in to comment.