-
Notifications
You must be signed in to change notification settings - Fork 218
Upgrade React to v19.2.3 (and fix type errors in useRef hooks) #4237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
9
commits into
main
Choose a base branch
from
copilot/update-react-v19-type-errors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
…ependabot merge) Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
…erability Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update codebase for React v19.2 type errors
Fix React 19 type errors for useRef hooks
Dec 17, 2025
d10c
requested changes
Dec 17, 2025
- Upgrade react and react-dom from 18.3.1 to 19.2.3 - Upgrade @types/react and @types/react-dom to 19.2.3 (matching versions) - Fix useRef hooks to include explicit initial values (React 19 requirement) - Update ref prop types to handle React 19's stricter null handling - Fix eslint config for reactHooks.configs compatibility Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
d10c
requested changes
Dec 17, 2025
The previous change removed the .flat accessor which caused ESLint to use the old eslintrc format config (with plugins as array of strings) instead of the flat config format (with plugins as object). This led to CI failures. Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
d10c
requested changes
Dec 17, 2025
Updated react, react-dom, @types/react, and @types/react-dom to use "^19.2.3" instead of "19.2.3" to match the convention used by other dependencies in the project. Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
React 19 requires explicit initial values for
useRef. Previously valid patterns likeuseRef<HTMLElement>()now fail type checking.Changes
React upgrade
reactandreact-domto^19.2.3@types/reactand@types/react-domto^19.2.3(matching versions with runtime packages, using caret prefix per project convention)Type fixes
undefinedinitial values touseRef<HTMLElement>()calls inModelAlertsResults.tsxandMethodRow.tsxuseScrollIntoViewsignature to acceptRefObject<E | null>instead ofRefObject<HTMLElement>AlertTableResultRow,AlertTablePathRow, andAlertTablePathNodeRowto include| nullConfiguration
reactHooks.configs.flat['recommended-latest']is used for flat config compatibility (the non-flat config uses old eslintrc format which is incompatible with ESLint flat config)Example
Before:
After:
Remember to update the changelog if there have been user-facing changes!
Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.