Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.63 KB

File metadata and controls

60 lines (43 loc) · 2.63 KB

OpenShift Console 4.22 Release Notes

Warning

These 4.22 release notes describe features and behavior that are still in progress and might change before general availability.

Changes to shared modules

Additional updates to these shared modules might occur before the 4.22 release is generally available.

  • Upgraded from react v17 to v18. Plugins must use react 18 to remain compatible with Console.
  • Upgraded from react-redux v7 to v8. Plugins must use react-redux v8 to remain compatible with Console.
  • Upgraded from react-i18next v11 to v15. Plugins must use react-i18next v15 to remain compatible with Console.
  • Added @openshift/dynamic-plugin-sdk to shared modules. Plugins must only use @openshift-console/dynamic-plugin-sdk to remain compatible with Console.

Removal of @openshift-console/plugin-shared

The @openshift-console/plugin-shared package has been removed from the Console codebase, and the corresponding npm package is deprecated. Plugins should remove this dependency from their package.json if present.

React 18 upgrade tips

Console now uses React 18. The following guidance highlights common update considerations for plugin authors.

Upgrade guidance

When upgrading plugins to support React 18, plugin authors might need to review and update custom hooks related to React 18's new rendering behavior. Plugins may also need to update their code to align with new type definitions. For more information, see:

New JSX transform

Console currently supports React 18. The new JSX transform was introduced in React 17. The new JSX transform reduces bundle size, as well as allowing the usage of JSX syntax without importing the React namespace. Adopting the new JSX transform is highly recommended in React 18.

In tsconfig.json, set the jsx compiler option to react-jsx. The following diff shows a common update required when migrating to the new JSX transform:

 {
   "compilerOptions": {
-    "jsx": "react"
+    "jsx": "react-jsx"
   }
 }

You may also consider running the upgrade-react-imports codemod to automatically update your imports to use named imports (which is React's recommended way). The React namespace import (import * as React from 'react') is still valid and will still be supported by React 18.