Skip to content

Upgrade UI to React 19 #25203

@jwinters01

Description

@jwinters01

Summary

Currently our UI runs on React 16, this is a fairly old version of React whose support ended 5 years ago. This version is also missing a lot of great new features and optimizations that can help improve performance, benchmarking capabilities, and developer experience. We should upgrade our UI in both argo-cd and argo-ui to version 19 so we can benefit from the latest features of the React ecosystem.

Motivation

The most immediate benefit of upgrading are for performance reasons. Versions 18 and 19 both make significant strides in improving rendering performance:

React 18

Performance Improvements:

  • State update batching: Prevents unnecessary re-renders by batching state updates outside of event handlers.
  • Transitions: Mark certain state updates as lower-priority so they don't block the main thread.

React 18 also provides new hooks like useSyncExternalStore to help with their crusade against every possible use case for useEffect.

React 19

The most immediate benefit of upgrading to v19 is the React Compiler. This is a new feature that can parse our React Applications and automatically memoize Components and Props that are rendered, which reduces unnecessary re-renders and makes renders faster.

Proposal

We should make these upgrades in the following order note: React 17 is generally considered an insignificant version bump, we shouldn't need to worry about any issues between 16 and 17:

  1. Upgrade argo-ui to React 18 (Upgrade Guide here)
  2. Upgrade argo-cd to React 18
  3. Test Extensively to ensure no regressions
  4. Upgrade Argo-ui to React 19 (guide here)
  5. Upgrade Argo-cd to React 19

Note: UI Extensions assume the core ui to have React version 16, I believe (but have not verified) that if we upgrade the core UI past version 16, extensions will also have to upgrade or they will fail to run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:uiUser interfaces bugs and enhancementsenhancementNew feature or requesttype:tech-debtEnhancement such as refactor invisible for the end user

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions