Skip to content

feat: ⬆️ Upgrade to React 19#8708

Draft
joshistoast wants to merge 13 commits into
invoke-ai:mainfrom
joshistoast:feat/react-19
Draft

feat: ⬆️ Upgrade to React 19#8708
joshistoast wants to merge 13 commits into
invoke-ai:mainfrom
joshistoast:feat/react-19

Conversation

@joshistoast
Copy link
Copy Markdown
Collaborator

@joshistoast joshistoast commented Dec 27, 2025

Summary

Upgrades react to version 19.2. We can take this opportunity to rewrite the codebase in a way where we can lean on the compiler to remove a lot of verbosity from the components (e.g. displayName, memo(), etc.).

Related Issues / Discussions

QA Instructions

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

@github-actions github-actions Bot added frontend-deps PRs that change frontend dependencies frontend PRs that change frontend files labels Dec 27, 2025
@lstein lstein added the v6.13.x label Jan 30, 2026
@lstein
Copy link
Copy Markdown
Collaborator

lstein commented Jan 30, 2026

@joshistoast @blessedcoolant I’m trying to place this on the release roadmap. What is the level of work needed to test this thoroughly and bring it out of the draft stage. I’ve currently slated it for v6.13.x, with an eta in 4-6 weeks; does that sound right? Could go in sooner if feasible.

@blessedcoolant
Copy link
Copy Markdown
Collaborator

blessedcoolant commented Jan 31, 2026

@joshistoast @blessedcoolant I’m trying to place this on the release roadmap. What is the level of work needed to test this thoroughly and bring it out of the draft stage. I’ve currently slated it for v6.13.x, with an eta in 4-6 weeks; does that sound right? Could go in sooner if feasible.

It is a much larger endeavor. React 19 introduced the React Compiler that auto memoizes to improve performance. It is optional but if we are upgrading we might as well make use of it.

So that brings us to the fact that we use memoization manually almost across every single component in the app. We will have to refactor them all to permit the React Compiler to take over instead. This could introduce a ton of bugs that will need fixing. Not to mention, we will have to check the compatibility of our other dependencies and tools.

I'd rather this be one slowly and carefully. There's no urgent rush for us to upgrade just yet but we should do it long term. It makes our lives much easier. On the list. But let's keep it under "whenever it feels good".

@joshistoast
Copy link
Copy Markdown
Collaborator Author

I'm avoiding the text tool issues for now in order to not conflict with #9091

@joshistoast joshistoast added enhancement New feature or request and removed DO NOT MERGE labels May 10, 2026
@joshistoast
Copy link
Copy Markdown
Collaborator Author

I kinda like that react is now smart enough to refuse a build if we've made bad choices

@lstein lstein assigned dunkeroni and unassigned blessedcoolant May 11, 2026
@lstein lstein moved this from 6.14.x Theme: LIBRARY UPDATES to 6.13.5 LIBRARY UPDATES in Invoke - Community Roadmap May 12, 2026
@lstein lstein added 6.13.5 Library Updates and removed 6.14.x labels May 12, 2026
joshistoast and others added 10 commits May 13, 2026 00:07
don't think it's working rn but here it is
required also upgrading storybook and vitest
mostly updates refobject types to have null possibilities, and in some places made updates to mitigate some
immediate react 19 rendering errors
- no hooks get called in loops anymore
- effect starts async filter after render
- updates state only after awaiting fetches
- tracks cancellation
- use sets for workflow ids
this can cause cascading re-renders, and is counted as an error to the react 19 recommended linting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.13.5 Library Updates enhancement New feature or request frontend PRs that change frontend files frontend-deps PRs that change frontend dependencies

Projects

Status: 6.13.5 LIBRARY UPDATES

Development

Successfully merging this pull request may close these issues.

4 participants