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

[core] 100% remove the prop types #13859

Merged
merged 2 commits into from
Dec 10, 2018

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 8, 2018

The docs of the unsafe-wrap option can be found in https://github.com/oliviertassinari/babel-plugin-transform-react-remove-prop-types#options.

Now, this has one implication. People can't access nested attributes of our prop types.
Doing Button.propTypes is OK but Button.propTypes.component is KO if they don't use the Babel plugin too. CRA has the same behavior, so it's not really a controversial choice. But I have added the v3.7.0 milestone just in case (no patch).

@oliviertassinari oliviertassinari merged commit bba7218 into mui:master Dec 10, 2018
@oliviertassinari oliviertassinari deleted the prop-types-unsafe-wrap branch December 10, 2018 22:11
@@ -88,7 +88,9 @@ StylesProvider.propTypes = {
sheetsRegistry: PropTypes.object,
};

StylesProvider.propTypes = exactProp(StylesProvider.propTypes);
if (process.env.NODE_ENV !== 'production') {
Copy link
Member

Choose a reason for hiding this comment

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

@oliviertassinari Does the plugin currently not support this or why is manually wrapping required in some places?

Copy link
Member Author

Choose a reason for hiding this comment

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

The plugin doesn't support it.

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

Successfully merging this pull request may close these issues.

2 participants