Skip to content

Commit 5951226

Browse files
authored
Merge pull request #14 from mjadobson/patch-1
Fix readme example typos
2 parents 7b10e9f + d33f2e7 commit 5951226

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 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() {
@@ -84,15 +84,15 @@ function visitor(element, instance, context) {
8484
// prevent traversing "4"'s children
8585
? false
8686
: true
87-
}
8887
})
8988
}
9089
return true
91-
};
90+
}
9291

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

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

9898
## FAQs

0 commit comments

Comments
 (0)