Skip to content

Commit 9531568

Browse files
authored
Fix recomputeTree example in README.md
`subtreeCallback` was wrongly identified.
1 parent e416401 commit 9531568

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
@@ -278,7 +278,7 @@ const tree = {
278278
tree.recomputeTree({
279279
'root-1': {
280280
open: false,
281-
subtreeWalker(node, ownerNode) {
281+
subtreeCallback(node, ownerNode) {
282282
// Since subtreeWalker affects the ownerNode as well, we can check if the
283283
// nodes are the same, and run the action only if they aren't
284284
if (node !== ownerNode) {
@@ -659,4 +659,4 @@ const Node = ({data: {isLeaf, name}, isOpen, style, setOpen}) => (
659659

660660
### 5. Migrate all your IDs to string
661661

662-
Using node IDs as keys should improve React rendering performance. However, it means that you won't be able to use `Symbol` as IDs anymore. You should move all your IDs to be strings instead of symbols.
662+
Using node IDs as keys should improve React rendering performance. However, it means that you won't be able to use `Symbol` as IDs anymore. You should move all your IDs to be strings instead of symbols.

0 commit comments

Comments
 (0)