Skip to content

Commit 2667fa6

Browse files
authored
Fix readme example typos
1 parent 7b10e9f commit 2667fa6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import reactTreeWalker from 'react-tree-walker';
3131
class Foo extends React.Component {
3232
constructor(props) {
3333
super(props);
34-
this.getValue = this.getValue.bind(this);
34+
this.getData = this.getData.bind(this);
3535
}
3636

3737
getData() {
@@ -90,9 +90,10 @@ function visitor(element, instance, context) {
9090
return true
9191
};
9292

93-
reactTreeWalker(app, visitor);
93+
reactTreeWalker(app, visitor).then(() => {
94+
console.log(values); // [1, 2, 4, 3];
95+
});
9496

95-
console.log(values); // [1, 2, 4, 3];
9697
```
9798

9899
## FAQs

0 commit comments

Comments
 (0)