fix:duplicate Devtools UI rendering when React StrictMode is enabled#404
fix:duplicate Devtools UI rendering when React StrictMode is enabled#404xPapla wants to merge 2 commits intoTanStack:mainfrom
Conversation
📝 WalkthroughWalkthroughRefactored devtools core state management from three boolean flags to a finite-state machine ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 8cca289
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/devtools
@tanstack/devtools-a11y
@tanstack/devtools-client
@tanstack/devtools-ui
@tanstack/devtools-utils
@tanstack/devtools-vite
@tanstack/devtools-event-bus
@tanstack/devtools-event-client
@tanstack/preact-devtools
@tanstack/react-devtools
@tanstack/solid-devtools
@tanstack/vue-devtools
commit: |
fixes #402, fixes #391
🎯 Changes
Previous implementation used separate boolean flags (
#isMounted,#isMounting,#abortMount) to track state, which led to race conditions inStrictMode. Whenmount(),unmount()andmount()were rapidly called, the secondmount()would reset the state flags before the first import had a chance to complete its abort check.I've replaced that with
AbortControllerand#stateunion to also eliminate illegal state (i.e.#isMounted = trueand#isMounting = true).✅ Checklist
pnpm test:pr.🚀 Release Impact
Summary by CodeRabbit