Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4631

Remove 'react' namespace import from console

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As followup work for CONSOLE-4400 (using the new JSX transform), we should rewrite our React namespace imports to use named imports instead.

      This can be done with the following codemod:

      npx react-codemod update-react-imports

      These changes are required for a future version of React (not 18 or 19), that will make importing the namespace no longer possible (source):

      In addition to cleaning up unused imports, this will also help you prepare for a future major version of React (not React 17) which will support ES Modules and not have a default export.

              rh-ee-jaclee Jackson Lee
              rh-ee-jaclee Jackson Lee
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: