DebuggingSettings.js — react Source File
Architecture documentation for DebuggingSettings.js, a javascript file in the react codebase. 4 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR eee1b576_c90e_a448_c010_79c8672c6ac5["DebuggingSettings.js"] 3c0f989f_424c_e338_72c3_e8bc259ca04f["SettingsShared.css"] eee1b576_c90e_a448_c010_79c8672c6ac5 --> 3c0f989f_424c_e338_72c3_e8bc259ca04f ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] eee1b576_c90e_a448_c010_79c8672c6ac5 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 40bf6909_04ae_bfb6_965f_14cfe98b94de["types"] eee1b576_c90e_a448_c010_79c8672c6ac5 --> 40bf6909_04ae_bfb6_965f_14cfe98b94de baf70b0e_4867_b3ed_962a_e5c9ae820fef["store"] eee1b576_c90e_a448_c010_79c8672c6ac5 --> baf70b0e_4867_b3ed_962a_e5c9ae820fef 33c9bb39_5afe_7433_b39c_5c97384e3323["SettingsModal.js"] 33c9bb39_5afe_7433_b39c_5c97384e3323 --> eee1b576_c90e_a448_c010_79c8672c6ac5 style eee1b576_c90e_a448_c010_79c8672c6ac5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import * as React from 'react';
import {use, useState, useEffect} from 'react';
import type {DevToolsHookSettings} from 'react-devtools-shared/src/backend/types';
import type Store from 'react-devtools-shared/src/devtools/store';
import styles from './SettingsShared.css';
type Props = {
hookSettings: Promise<$ReadOnly<DevToolsHookSettings>>,
store: Store,
};
export default function DebuggingSettings({
hookSettings,
store,
}: Props): React.Node {
const usedHookSettings = use(hookSettings);
const [appendComponentStack, setAppendComponentStack] = useState(
usedHookSettings.appendComponentStack,
);
const [breakOnConsoleErrors, setBreakOnConsoleErrors] = useState(
usedHookSettings.breakOnConsoleErrors,
);
const [hideConsoleLogsInStrictMode, setHideConsoleLogsInStrictMode] =
useState(usedHookSettings.hideConsoleLogsInStrictMode);
const [showInlineWarningsAndErrors, setShowInlineWarningsAndErrors] =
useState(usedHookSettings.showInlineWarningsAndErrors);
const [
disableSecondConsoleLogDimmingInStrictMode,
setDisableSecondConsoleLogDimmingInStrictMode,
] = useState(usedHookSettings.disableSecondConsoleLogDimmingInStrictMode);
useEffect(() => {
store.setShouldShowWarningsAndErrors(showInlineWarningsAndErrors);
}, [showInlineWarningsAndErrors]);
useEffect(() => {
store.updateHookSettings({
appendComponentStack,
breakOnConsoleErrors,
showInlineWarningsAndErrors,
hideConsoleLogsInStrictMode,
disableSecondConsoleLogDimmingInStrictMode,
});
}, [
store,
appendComponentStack,
breakOnConsoleErrors,
showInlineWarningsAndErrors,
// ... (109 more lines)
Domain
Subdomains
Functions
Dependencies
- SettingsShared.css
- react
- store
- types
Source
Frequently Asked Questions
What does DebuggingSettings.js do?
DebuggingSettings.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in DebuggingSettings.js?
DebuggingSettings.js defines 1 function(s): DebuggingSettings.
What does DebuggingSettings.js depend on?
DebuggingSettings.js imports 4 module(s): SettingsShared.css, react, store, types.
What files import DebuggingSettings.js?
DebuggingSettings.js is imported by 1 file(s): SettingsModal.js.
Where is DebuggingSettings.js in the architecture?
DebuggingSettings.js is located at packages/react-devtools-shared/src/devtools/views/Settings/DebuggingSettings.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shared/src/devtools/views/Settings).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free