-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Resolve TypeScript errors in React 19 (by removing the deprecated propTypes.ts) #4534
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
base: main
Are you sure you want to change the base?
Conversation
…t.Requireable and React.Validator. This should resolve the remaining typescript conflicts that mobx-react had with React 19. * Removed the "component with observable propTypes" test, since it's no longer applicable. (and it was referencing typescript types that are no longer importable, so using `test.skip` is not sufficient)
…pecific prop-types.
🦋 Changeset detectedLatest commit: f5c0fe7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I added a basic changelog entry for the PR: (to satisfy changeset-bot)
I marked it as a major change (assuming even deprecated APIs are considered part of the semver-tracked api-surface), but I can change it to minor if needed. |
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.
Thanks for making this PR! Doing this as major sounds both as slightly overkill and conceptually correct. Doing it as minor will always trip some project up though, so let's do a major :)
Would you mind updating peerDependencies
in package.json, and the compatibility table in the README accordingly? Otherwise looking great, thanks!
…ersion 10 adds (completed) support for React 19.
I've added the second change requested (compatibility table update in readme). [although, I'm not 100% sure it matches what you wanted/expected] I'm also trying to add the first change requested (adding of react 19 as a peer dependency). But git appears to have a hook that warns me to run "yarn install" prior to pushing. When I do so, it seems to result in a massive set of changes to the lock file, which would not be feasible for maintainers to visually review. So I imagine this step would have to be performed by an existing trusted maintainer (to ensure the lock file is authentic). Note: It's possible I'm running a different version of yarn? Running "yarn install" resulted in an unexpectedly large set of file changes. (to |
Removed the deprecated
propTypes.ts
, and some remaining references to its exports, in order to make mobx-react compatible with React 19 (without TypeScript compile errors), since React 19 removes its prop-types exports ofReact.Requireable
andReact.Validator
. (@mweststrate gave a go-ahead for this here)Changelog:
React.Requireable
andReact.Validator
.propTypes.test.ts
file. (not applicable anymore, since the mobx-react specific prop-types no longer exist)test.skip
is not sufficient)Code change checklist
/docs
. For new functionality, at leastAPI.md
should be updatedyarn mobx test:performance
)