File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ yarn add react-d3-tree
32
32
33
33
## Usage
34
34
``` jsx
35
+ import React from ' react' ;
35
36
import Tree from ' react-d3-tree' ;
36
37
37
38
const myTreeData = [
@@ -58,7 +59,7 @@ const myTreeData = [
58
59
},
59
60
];
60
61
61
- class MyComponent extends Component {
62
+ class MyComponent extends React . Component {
62
63
render () {
63
64
return (
64
65
{/* <Tree /> will fill width/height of its container; in this case `#treeWrapper` */ }
@@ -93,6 +94,7 @@ Statically hosted JSON or CSV files can be used as data sources via the addition
93
94
### Example
94
95
95
96
``` jsx
97
+ import React from ' react' ;
96
98
import { Tree , treeUtil } from ' react-d3-tree' ;
97
99
98
100
const csvSource = ' https://raw.githubusercontent.com/bkrem/react-d3-tree/master/docs/examples/data/csv-example.csv' ;
@@ -113,7 +115,7 @@ componentWillMount() {
113
115
.catch ((err ) => console .error (err));
114
116
}
115
117
116
- class MyComponent extends Component {
118
+ class MyComponent extends React . Component {
117
119
render () {
118
120
return (
119
121
{/* <Tree /> will fill width/height of its container; in this case `#treeWrapper` */ }
You can’t perform that action at this time.
0 commit comments