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

fix: types for React 18 #1422

Merged
merged 1 commit into from
May 28, 2024
Merged

fix: types for React 18 #1422

merged 1 commit into from
May 28, 2024

Conversation

haideralsh
Copy link
Contributor

@haideralsh haideralsh commented May 28, 2024

Result of running:

npx types-react-codemod preset-18 ./src

Pick transforms to apply (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
 ◯ context-any
 ◉ deprecated-react-type
 ◉ deprecated-sfc-element
 ◉ deprecated-sfc
 ◉ deprecated-stateless-component
 ◉ implicit-children
 ◯ useCallback-implicit-any

Changes include

  • breaking change: a change that is not backwards-compatible and/or changes current functionality
  • fix: a non-breaking change that solves an issue
  • feature: a non-breaking change that adds functionality
  • chore: contains no changes affecting the library, such as documentation or test updates

Feature checklist

  • Appropriate tests have been added
  • Documentation has been updated
  • Accessibility has been considered

@@ -28,7 +28,7 @@ const RangeContainer: React.FC<RangeContainerProps> = ({
const restProps = omitSubset(props, propTypes.space);

return (
<Flex {...spaceProps} flexDirection="column">
(<Flex {...spaceProps} flexDirection="column">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like an unintended change

@@ -208,7 +208,7 @@ const SelectNavBarBasedOnWidth = ({ width, defaultOpen, breakpointUpper, ...prop
} else {
return (
// @ts-ignore
<SmallNavBar {...props} width={currentWidth} defaultOpen={defaultOpen} />
(<SmallNavBar {...props} width={currentWidth} defaultOpen={defaultOpen} />)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unintended change

const { colors } = useTheme();

const color1 = inactive ? colors.grey : colors.blue;
const color2 = inactive ? colors.lightGrey : colors.yellow;

return (
// Modified svg By Sam Herbert (@sherb), for everyone. More @ http://goo.gl/7AJzbL
<svg
(<svg
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unintended change

@haideralsh haideralsh force-pushed the fix-types-for-react-18 branch from 1cc12ca to 5af6663 Compare May 28, 2024 20:55
Result of running: npx types-react-codemod preset-18 ./src

Pick transforms to apply (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
 ◯ context-any
 ◉ deprecated-react-type
 ◉ deprecated-sfc-element
 ◉ deprecated-sfc
 ◉ deprecated-stateless-component
 ◉ implicit-children
 ◯ useCallback-implicit-any
@haideralsh haideralsh force-pushed the fix-types-for-react-18 branch from 5af6663 to 139e8f5 Compare May 28, 2024 21:09
@haideralsh haideralsh merged commit e1fc3c7 into master May 28, 2024
5 checks passed
@haideralsh haideralsh deleted the fix-types-for-react-18 branch May 28, 2024 21:26
Copy link

🎉 This PR is included in version 10.2.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

1 participant