-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Deprecate React.createMixin #8853
Conversation
This API was never fully implemented. Since mixins are no longer considered part of the future React API, it will be removed.
warning( | ||
warnedForCreateMixin, | ||
'React.createMixin is deprecated and should not be used. You ' + | ||
'can use your mixin directly instead.' |
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.
I considered adding some messaging here about mixins being considered harmful, but I'm not sure if that's overstepping since they're not actually considered deprecated.
warning( | ||
warnedForCreateMixin, | ||
'React.createMixin is deprecated and should not be used. You ' + | ||
'can use your mixin directly instead.' |
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.
"You can use your mixin" sounds a bit aggressive, maybe "You can use this mixin"?
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.
Fixed!
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.
Please merge after CI passes.
CI is failing, looks related to this: |
I don't think so. It seems like this was broken by #8858: we didn't run the tests in Fiber mode and one of the tests seems to assert a different warning message. |
One step towards #8852. This also adds tests for the deprecation warning, along with the
React.__spread
method. I didn't see a good place to stick these tests, so I just created a new__tests__
folder insrc/isomorphic
.