SimpleBar breaks React hot update / Failed to execute 'removeChild'
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 527
- PR merge metrics
- No merged PRs in 30d
Description
SimpleBar causes an error when hot update tries to update the dom when I change my code.
I haven't touched my working project for a few month, just cloned it again and installed all npm packages, but haven't updated it (finally I did, but that doesn't helped)
Update the code from:
```
```
... to:
```
newcontent
```
Will cause:
```
react-dom.development.js:10301 Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
at removeChild (http://localhost:3000/static/js/0.chunk.js:136920:22)
at unmountHostComponents (http://localhost:3000/static/js/0.chunk.js:147720:13)
at commitDeletion (http://localhost:3000/static/js/0.chunk.js:147771:9)
at commitMutationEffects (http://localhost:3000/static/js/0.chunk.js:149812:15)
at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/0.chunk.js:130505:18)
at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/0.chunk.js:130554:20)
at invokeGuardedCallback (http://localhost:3000/static/js/0.chunk.js:130614:35)
at commitRootImpl (http://localhost:3000/static/js/0.chunk.js:149533:13)
at unstable_runWithPriority (http://localhost:3000/static/js/0.chunk.js:172035:16)
at runWithPriority$1 (http://localhost:3000/static/js/0.chunk.js:137911:14)
at commitRoot (http://localhost:3000/static/js/0.chunk.js:149406:7)
at performSyncWorkOnRoot (http://localhost:3000/static/js/0.chunk.js:148748:7)
at http://localhost:3000/static/js/0.chunk.js:137965:30
at unstable_runWithPriority (http://localhost:3000/static/js/0.chunk.js:172035:16)
at runWithPriority$1 (http://localhost:3000/static/js/0.chunk.js:137911:14)
at flushSyncCallbackQueueImpl (http://localhost:3000/static/js/0.chunk.js:137960:13)
at flushSyncCallbackQueue (http://localhost:3000/static/js/0.chunk.js:137948:7)
at flushSync (http://localhost:3000/static/js/0.chunk.js:148887:11)
at Object.scheduleRefresh (http://localhost:3000/static/js/0.chunk.js:150817:9)
at http://localhost:3000/static/js/0.chunk.js:161646:21
at Set.forEach ()
at Object.performReactRefresh (http://localhost:3000/static/js/0.chunk.js:161635:30)
at http://localhost:3000/static/js/0.chunk.js:41665:17
```
It works if I remove `data-simplebar data-simplebar-auto-hide="true"`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the provided SimpleBar markup and React hot-update reproduction, focusing on the data-simplebar and data-simplebar-auto-hide attributes. Verify the behavior while changing the child content, and consider the issue complete when the update no longer raises the reported removeChild DOMException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100