mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
docs: re-position comments to account for code sample width (#7602)
(cherry picked from commit 9511b4fe29)
This commit is contained in:
committed by
Paul O’Shannessy
parent
d90cbec236
commit
0983d2dbcf
@@ -50,8 +50,11 @@ function onClick(event) {
|
||||
console.log(eventType); // => "click"
|
||||
}, 0);
|
||||
|
||||
this.setState({clickEvent: event}); // Won't work. this.state.clickEvent will only contain null values.
|
||||
this.setState({eventType: event.type}); // You can still export event properties.
|
||||
// Won't work. this.state.clickEvent will only contain null values.
|
||||
this.setState({clickEvent: event});
|
||||
|
||||
// You can still export event properties.
|
||||
this.setState({eventType: event.type});
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user