Skip to content
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

Upgrade React to v18 #10466

Open
mattkrick opened this issue Nov 12, 2024 · 0 comments
Open

Upgrade React to v18 #10466

mattkrick opened this issue Nov 12, 2024 · 0 comments

Comments

@mattkrick
Copy link
Member

mattkrick commented Nov 12, 2024

See #8340

Upgrading Relay didn't fix all the frontend errors. In dev, I see the following error pop up:

warning.js:30 Warning: Relay: Expected to have been able to read non-null data for fragment `ReactjiCount_reactji` declared in `useFragment()`, since fragment reference was non-null. Make sure that that `useFragment()`'s parent isn't holding on to and/or 
passing a fragment reference for data that has been deleted.

This is triggered by any component using the initial render or transition children. See https://github.com/ParabolInc/parabol/blob/09b38548e65efc5ad14c3c68a2d223fe4cbb4a1e/packages/client/components/ReflectionCard/ReactjiSection.tsx

React v18 was released 2 years ago. Now that React v19 has been released, it feels very safe to upgrade to v18. The only problem is the time it takes to upgrade.

Benefits:

  • we can use modern libraries (e.g. motion, next version of relay, etc)
  • v18 is maintained & bugs are fixed, etc
  • fewer bugs & write less hacky code
  • can write components faster by using newer libraries instead of writing big hacky workarounds without those libraries
  • the sooner we do it, the smaller the job will be

Estimated effort: 1 - 2 weeks

@github-project-automation github-project-automation bot moved this to To triage in Product Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

1 participant