Skip to content

feat: Update PulpUI to React 19 #338

Description

@Redtigercod4

Summary

React 19 released on 25 April 2024, bringing a fleet of new features to the framework, whilst also deprecated a variety of functions. As PulpUI has already been upgraded to React@18.3.1, this allows the deprecated functions to be make visible for refactor. With the JavaScript eco-system rapidly changing and the introduction of PatternFly 6, migrating to the latest React version will provide a range of performance & security benefits, avoiding future issues when support drops for React 18.

Tasks

  1. Understand current dependency requirements for React and peer dependencies.
  2. Update Package Files: Bump react, react-dom, @types/react and @types/react-dom to 19.2.8
  3. Deploy react/19/migration-recipe codemod to convert deprecated functions to new standards.
  4. Deploy types-react-codemod to convert deprecated types to new standards.
  5. Run Cypress tests & run UI build steps
  6. Document minor issues found for future attention within Github Issues.

Packages to be updated

  1. react-markdown

Packages of concern

  1. file-saver
  2. compare-versions

Found Blockers (To be updated throughout work)

  1. @patternfly packages require upgrade to 6.6.0 to support React 19.

References

  1. https://react.dev/blog/2024/04/25/react-19-upgrade-guide
  2. ReactFragment deprecated in React 19, replace with ReactNode #178
  3. https://www.npmjs.com/package/react
  4. https://www.npmjs.com/package/react-dom
  5. https://www.npmjs.com/package/@types/react
  6. https://www.npmjs.com/package/@types/react-dom

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions