We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a04301d commit 4352d1fCopy full SHA for 4352d1f
README.md
@@ -45,17 +45,6 @@ class Widget extends React.Component {
45
checked: [],
46
expanded: [],
47
};
48
-
49
- this.onCheck = this.onCheck.bind(this);
50
- this.onExpand = this.onExpand.bind(this);
51
- }
52
53
- onCheck(checked) {
54
- this.setState({ checked });
55
56
57
- onExpand(expanded) {
58
- this.setState({ expanded });
59
}
60
61
render() {
@@ -67,8 +56,8 @@ class Widget extends React.Component {
67
nodes={nodes}
68
checked={checked}
69
expanded={expanded}
70
- onCheck={this.onCheck}
71
- onExpand={this.onExpand}
+ onCheck={checked => this.setState({ checked }}
+ onExpand={expanded => this.setState({ expanded }}
72
/>
73
62
);
74
63
0 commit comments