-
Notifications
You must be signed in to change notification settings - Fork 35
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
adjust types for react 19 #125
base: master
Are you sure you want to change the base?
Conversation
Is |
@@ -40,15 +40,15 @@ | |||
"enzyme-adapter-react-16": "^1.15.6" | |||
}, | |||
"resolutions": { | |||
"@types/react": "^18.0.0", | |||
"@types/react": "^18.0.0 || ^19.0.0", |
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.
resolutions has to point to a specific version.
@@ -21,7 +20,7 @@ const nothing = () => { | |||
/** | |||
* Removes scrollbar from the page and contain the scroll within the Lock | |||
*/ | |||
const RemoveScroll: RemoveScrollUIType = React.forwardRef<HTMLElement, IRemoveScrollUIProps>((props, parentRef) => { | |||
const RemoveScroll: RemoveScrollUIType = ({ ref: parentRef, ...props }) => { |
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.
this instantly drops support for anything before React 19 and thus required major version bump.
Not something I can do.
RemoveScroll.defaultProps = { | ||
enabled: true, | ||
removeScrollBar: true, | ||
inert: false, | ||
}; |
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.
👍 this could be dropped. Thanks for pointing.
Likely this is where it should be fixed first. |
Fixed in |
This pr upgrades all types to react 19 and removes
defaultProps
andforwardRef
Right now it is broken because of the
use-sidecar
types - background is that theJSX
types were moved toReact.JSX