feat: ⬆️ Upgrade to React 19#8708
Conversation
|
@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". |
|
I'm avoiding the text tool issues for now in order to not conflict with #9091 |
|
I kinda like that react is now smart enough to refuse a build if we've made bad choices |
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.
34a13a4 to
71b72a1
Compare
Summary
Upgrades
reactto version19.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
What's Newcopy (if doing a release after this PR)