-
Notifications
You must be signed in to change notification settings - Fork 192
Closed as not planned
Description
Component warnings are currently printed as errors:
Lines 4 to 9 in db8b843
export function warning(valid: boolean, message: string) { | |
// Support uglify | |
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) { | |
console.error(`Warning: ${message}`); | |
} | |
} |
In development, they show up in the console like this:
The stack traces are unnecessary. They flood our consoles and make deprecation messages themselves hard to spot.
And deprecation warnings are not errors, and they should not be displayed as such. Showing them as errors distracts developers from actually critical errors, causes unnecessary panics, makes Ant Design unpleasant to work with, and developers are more likely to ignore future deprecation notices (a cry-wolf effect).
Please use console.warn
for your deprecation warnings.
bleuarg, vicrep, hotzenklotz, SpaNb4, yhy-1 and 6 more
Metadata
Metadata
Assignees
Labels
No labels