-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Improve the warning strategy #15343
Comments
|
React has reverted the warn and error helpers: facebook/react#16126. |
I'm going to evaluate our custom propTypes and see what we can move into custom |
Sweet, from what @merceyz said, it could unlock the migration of more components to the props description in the TypeScript defintions :). |
Referencing #17480 here. It's probably good to have some link/section about debugging react apps. The error overlay for create-react-app prioritizes the JS stack trace and has a barely legibly notice about console. We need to make sure devs are aware that they need to read (and address) the console output top-down not bottom-up . |
For use of console.warn see: mui/material-ui#15343
Looking at the codebase, I can count:
What do you think of reserving the usage of |
Closing this for now unless React.warn gets re-introduced. |
Did you decide on a policy around console.warn vs console.error (when to use which one)? #15343 (comment) |
How do you guys want to handle the warning thing in the future, there is a wide range of different options. There are two problems with a strategy like this:
https://github.com/mui-org/material-ui/blob/8ae684d7c9d884c84d89c40da88b46254e5d53a2/packages/material-ui/src/RadioGroup/RadioGroup.js#L39-L52
Maybe?
plus https://github.com/oliviertassinari/babel-plugin-transform-dev-warning
Another option:
Originally posted by @oliviertassinari in #15291 (comment)
The text was updated successfully, but these errors were encountered: