Skip to content
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

update react imports to easy react upgrade #7347

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zoran995
Copy link
Contributor

@zoran995 zoran995 commented Nov 29, 2024

What this PR does

Small step toward #6538
Run upgrade-react-imports codemod to update react imports so they can work in react 17/18. Partially supersedes #7051.

Don't worry about merge conflicts first PR is only changes by codemod so it is easy to recreate

Test me

Tested locally yarn build-for-node and yarn gulp build. All tests passes. Running the app locally works

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@@ -126,6 +126,7 @@ export const ShareUrl = forwardRef<
id="share-url"
rounded={rounded}
onCopy={(text) =>
// eslint-disable-next-line react/prop-types
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason, prop-types lint doesn't like forwardRef, suggestion to look into those after upgrade

@@ -113,6 +113,7 @@ const SidePanelButton = forwardRef<HTMLButtonElement, SidePanelButtonProps>(
<Button
primary
ref={ref}
// eslint-disable-next-line react/prop-types
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

const ButtonWithRef = forwardRef<HTMLButtonElement, ButtonProps>(
(props, ref) => <Button {...props} buttonRef={ref} />
);
ButtonWithRef.displayName = "Button";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, just different lint rule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant