fix(deps-dev): update to react 19 #640
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update to React 19
Summary
Breaking Changes Fixed
React 19 Strict Mode Changes
useRefcalls to provide explicit initial values (nullor appropriate defaults)navigate()calls out oftoast.promiserender callbacks - React 19 strictly enforces no state updates during render phasereact-toastify v11 API Changes
React Router 7 Changes
voidoperator where neededRelationsView.tsxto use absolute paths (/item/${id}) instead of relative pathsRace Condition Fixes
React 19's stricter batching and scheduling exposed race conditions in URL state synchronization:
Tag Filter Sync (UtopiaMapInner.tsx)
useEffectwithfilterTagsin dependencies would re-add tags from stale URL after removaltagsInitializedRefto only sync tags from URL on initial load, not on every state changeLayer Filter Sync (useFilter.tsx)
prevVisibleLayersRefto track actual layer changes and usewindow.locationinstead of React Router'slocationto avoid stale stateFiles Changed
useTimeout.tsxuseClusterRef.tsxUtopiaMapInner.tsxuseFilter.tsxRelationsView.tsxLoginPage.tsxSignupPage.tsxSetNewPasswordPage.tsxRequestPasswordPage.tsxAutocomplete.tsxContextWrapper.tsxUserControl.tsxTest Plan
?tags=...,?layers=...) correctly initializes filters