An error occurs when nesting patches and changing the level of [tree structure data]
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 881
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug Report
An error occurs when nesting patches and changing the level of [tree structure data]
Link to repro
https://codesandbox.io/s/minimal-repro-forked-xvb93p
To Reproduce
1.remove a node
2.Add a new node where it was previously removed
3.Add previously deleted nodes to a subset of new nodes
Observed behavior
An error occurs when using nextData
Expected behavior
should not go wrong
Environment
immer verson :9.0.12
Use default configuration
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox using Immer 9.0.12 and reproduce the three listed tree-data operations. Then trace the nested-patch handling involved when nextData is used. Done means the reproduction no longer throws and the expected tree changes remain correct; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100