-
Notifications
You must be signed in to change notification settings - Fork 364
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
base: main
Are you sure you want to change the base?
Conversation
6a9473e
to
20cd04e
Compare
20cd04e
to
f0b5a74
Compare
@@ -126,6 +126,7 @@ export const ShareUrl = forwardRef< | |||
id="share-url" | |||
rounded={rounded} | |||
onCopy={(text) => | |||
// eslint-disable-next-line react/prop-types |
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.
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 |
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.
same as above
const ButtonWithRef = forwardRef<HTMLButtonElement, ButtonProps>( | ||
(props, ref) => <Button {...props} buttonRef={ref} /> | ||
); | ||
ButtonWithRef.displayName = "Button"; |
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.
same as above, just different lint rule
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
andyarn gulp build
. All tests passes. Running the app locally worksChecklist
doc/
.