Commit d8879ed
authored
Rewrite state management with pure tree operations (#45)
Replace mutation-based tree operations with immutable pure functions
using structural sharing. Remove lodash dependency.
- 12-32x faster updates (no more cloneDeep on every change)
- 11-13x faster selection
- Reorganize src/ into components/, tree/, hooks/, types.ts1 parent c0a41f3 commit d8879ed
22 files changed
Lines changed: 584 additions & 475 deletions
File tree
- src
- components
- hooks
- tree
- utils
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
0 commit comments