Warning
These 4.22 release notes describe features and behavior that are still in progress and might change before general availability.
Additional updates to these shared modules might occur before the 4.22 release is generally available.
- Upgraded from
reactv17 to v18. Plugins must usereact18 to remain compatible with Console. - Upgraded from
react-reduxv7 to v8. Plugins must usereact-reduxv8 to remain compatible with Console. - Upgraded from
react-i18nextv11 to v15. Plugins must usereact-i18nextv15 to remain compatible with Console. - Added
@openshift/dynamic-plugin-sdkto shared modules. Plugins must only use@openshift-console/dynamic-plugin-sdkto remain compatible with Console.
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.
Console now uses React 18. The following guidance highlights common update considerations for plugin authors.
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:
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.