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

chore(deps): upgrade react to v18 #278

Closed

Conversation

huyenltnguyen
Copy link
Member

@huyenltnguyen huyenltnguyen commented Aug 12, 2024

Checklist:

This PR upgrades react and react-dom to v18. The testing-library packages also need to be upgraded as a result, since the older versions don't support the newer versions of React:

Screenshot 2024-08-13 at 06 51 19

Closes #232

Note: This should be merged after #275.

Testing

  • Ran pnpm storybook and pnpm test and confirmed they are working as expected
  • Symlinked the package and tested it on /learn, things seem to be working as well

Copy link

socket-security bot commented Aug 12, 2024

@huyenltnguyen huyenltnguyen added the status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. label Aug 12, 2024
"@types/react": "16.14.60",
"@types/react-dom": "16.9.24",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest version of @types/react-dom is 18.3.0: https://www.npmjs.com/package/@types/react-dom.

@huyenltnguyen
Copy link
Member Author

Closing as we decided to not upgrade React yet.

The upgrade was meant to allow us to use Headless UI v2, which only supports React 18 or above.

With React being moved to the peerDependencies list, the upgrade would mean that we have to maintain two @freecodecamp/ui versions: one supports React 16 (for /learn), and one supports React 18 (for newer clients). And this would bring too much maintenance overhead.

We will defer this change until we can get to the React upgrade in /learn.

@huyenltnguyen huyenltnguyen deleted the chore/upgrade-react branch September 10, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade React to v18
1 participant