-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use the new JSX transform #2102
Conversation
packages/itwinui-react/src/utils/components/InputFlexContainer.tsx
Outdated
Show resolved
Hide resolved
@@ -2,7 +2,7 @@ | |||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | |||
* See LICENSE.md in the project root for license terms and full copyright notice. | |||
*--------------------------------------------------------------------------------------------*/ | |||
import React from 'react'; | |||
import { useState } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To confirm, do we want to continue using the default/deconstructed import in react-workshop
(similar to #2102 (comment))?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't want to use the default import. Not sure where you're getting this idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #2102 (comment), the codemod changed the itwinui-react
code to use deconstructed named imports but then you changed it to use namespace imports. So, I thought should we use default/namespace imports in react-workshop
too?
Changes
Builds upon #2100.
I've made a simple change to the
swc
config to use the new "automatic" JSX runtime instead of "classic". This helps supports React 19, which requires the new JSX transform.I also updated the tsconfig and eslint config to detect the new JSX runtime, and ran the official codemod on the
src
directory to fix all imports.Testing
Manually verified that the build output in
esm
/cjs
folders is using the new runtime.Also made sure all tests are passing and there are no IDE errors.
Docs
Added changeset.