Skip to content

Commit c5a9013

Browse files
committed
Simplify README example
1 parent 406a6f9 commit c5a9013

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ npm install react-checkbox-tree --save
2525
A quick usage example is included below. Note that the react-checkbox-tree component is [controlled](https://facebook.github.io/react/docs/forms.html#controlled-components). In other words, it is stateless. You must update its `checked` and `expanded` properties whenever a change occurs.
2626

2727
``` javascript
28+
import React from 'react';
2829
import CheckboxTree from 'react-checkbox-tree';
2930

3031
const nodes = [{
@@ -35,7 +36,7 @@ const nodes = [{
3536
title: 'Leaf Node 1-1',
3637
}, {
3738
value: 'node-1-2',
38-
title: 'Leaf Node 1-2'
39+
title: 'Leaf Node 1-2',
3940
}],
4041
}];
4142

@@ -54,7 +55,6 @@ class Widget extends React.Component {
5455

5556
return (
5657
<Tree
57-
name="tree_nodes"
5858
nodes={nodes}
5959
checked={checked}
6060
expanded={expanded}

0 commit comments

Comments
 (0)