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

Enable support for React 18 #625

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Feb 11, 2025

Description

The Open edX MFEs are overdue to support React 18 (especially as React 19 is already out now, too). Some efforts have been started to support React 18 in the shared JavaScript libraries, such as Paragon (openedx/paragon#3367, v22 and v23).

By enabling support for React 18 (should be additive-only), we can further enable incremental migration to React 18 within MFEs. Most of the changes are within the example MFE included in this repository for testing.

The React 18 Upgrade Guide was followed.

Additionally:

  • All Webpack configs updated to ensure @svgr/webpack is also run on .tsx files.
  • Migrates away from react-test-renderer in favor of @testing-library/react within the example MFE app.
  • Makes the redux and react-redux peer dependencies optional, as some MFEs opt to not use Redux in favor of React Query.

@adamstankiewicz adamstankiewicz marked this pull request as ready for review February 18, 2025 12:38
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

The code changes look great! I'm holding off on approving until I have a sandbox spun up so I can do a bit of testing.

@brian-smith-tcril
Copy link
Contributor

The sandbox for openedx/frontend-app-authoring#1675 is up and everything I've tested is looking good! https://app.pr-1675-e8373e.sandboxes.opencraft.hosting/authoring/course/course-v1:demo+Course+1

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

:shipit:

@brian-smith-tcril brian-smith-tcril merged commit 2cf49c6 into openedx:master Feb 20, 2025
4 checks passed
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (c70ef4e) to head (4350d61).
Report is 2 commits behind head on master.

Additional details and impacted files
@@      Coverage Diff      @@
##   master   #625   +/-   ##
=============================
=============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@openedx-semantic-release-bot

🎉 This PR is included in version 14.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@openedx-semantic-release-bot

🎉 This PR is included in version 15.0.0-alpha.24 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants