Skip to content

EN-26992: Upgrade to React 19#889

Open
JosephDSchwartz wants to merge 5 commits intopre-prodfrom
react-19
Open

EN-26992: Upgrade to React 19#889
JosephDSchwartz wants to merge 5 commits intopre-prodfrom
react-19

Conversation

@JosephDSchwartz
Copy link
Collaborator

@JosephDSchwartz JosephDSchwartz commented Sep 19, 2025

EN-26992

The upgrade to React 19 resulted in a few different changes:

  1. Upgrading dependencies to versions that support React 19.
  2. Typescript updates necessitated by the large update to types with React 19 (see [react] Types for React 19 DefinitelyTyped/DefinitelyTyped#69022). What mainly changed was:
    • defaultProps is no longer allowed on function components so those were removed. propTypes is deprecated but was only removed where it was causing problems to minimize the number of changes.
    • react-datepicker exports its own types and changes were made to switch over to those. Further changes can and probably should be made to fully remove unnecessary code from ReactDatePickerPropTypes.ts.
  3. The configuration in styleguide.config.js that replaces process with {} was causing problems (see screenshot). Wrapping it in parenthesis, i.e. ({}), fixed the problem and seems to not have re-introduced the issues that necessitated the configuration in the first place.
styleguidist_localhost_blank

@JosephDSchwartz JosephDSchwartz requested a review from a team as a code owner September 19, 2025 19:45
@github-actions
Copy link

Commitlint

commitlint results

The following commit messages do not meet our commit convention. Please reword these commits for correct versioning and changelog generation.

  • Update es-components package to use React 19
    • subject may not be empty
    • type may not be empty

plugins: [
new webpack.DefinePlugin({
ASSETS_PATH: JSON.stringify(assets_url),
process: `{}`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There was a problem this caused (see the screenshot in the description of this pull request) and wrapping the curly braces like this fixed it. Testing didn't reveal any problems, but if anyone knows more about why this change was made (it was made here) and has concerns or knows what specifically to test for, let me know.

Comment on lines -48 to +49
font-family: 'Source Sans Pro', 'Segoe UI', Segoe, Calibri, Tahoma,
sans-serif;
font-family:
'Source Sans Pro', 'Segoe UI', Segoe, Calibri, Tahoma, sans-serif;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't need to be updated with this PR, but the font should come from the theme, rather than being hard-coded.

@bradyclifford
Copy link
Contributor

bradyclifford commented Sep 22, 2025

I had thought we couldn't upgrade to React 19 in this library until our static front-end CDN supported ESM. Is that no longer the case @stevematney? Perhaps I misunderstood and the dependency is related to isolated-externals more than React 19?

@bradyclifford bradyclifford changed the title Upgrade to React 19 EN-26992: Upgrade to React 19 Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants