mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Expose DEV-mode warnings in devtools UI (#20463)
Co-authored-by: Brian Vaughn <bvaughn@fb.com>
This commit is contained in:
co-authored by
Brian Vaughn
parent
6cbb9394d1
commit
09a2c363a5
+19
@@ -19,6 +19,8 @@ export default function DebuggingSettings(_: {||}) {
|
||||
breakOnConsoleErrors,
|
||||
setAppendComponentStack,
|
||||
setBreakOnConsoleErrors,
|
||||
setShowInlineWarningsAndErrors,
|
||||
showInlineWarningsAndErrors,
|
||||
} = useContext(SettingsContext);
|
||||
|
||||
return (
|
||||
@@ -36,6 +38,19 @@ export default function DebuggingSettings(_: {||}) {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className={styles.Setting}>
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={showInlineWarningsAndErrors}
|
||||
onChange={({currentTarget}) =>
|
||||
setShowInlineWarningsAndErrors(currentTarget.checked)
|
||||
}
|
||||
/>{' '}
|
||||
Show inline warnings and errors.
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className={styles.Setting}>
|
||||
<label>
|
||||
<input
|
||||
@@ -48,6 +63,10 @@ export default function DebuggingSettings(_: {||}) {
|
||||
Break on warnings
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className={styles.ConsoleAPIWarning}>
|
||||
These settings require DevTools to override native console APIs.
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user