SettingsModal() — react Function Reference
Architecture documentation for the SettingsModal() function in SettingsModal.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD d3170368_5f49_37fa_9316_62006967af5d["SettingsModal()"] 33c9bb39_5afe_7433_b39c_5c97384e3323["SettingsModal.js"] d3170368_5f49_37fa_9316_62006967af5d -->|defined in| 33c9bb39_5afe_7433_b39c_5c97384e3323 style d3170368_5f49_37fa_9316_62006967af5d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js lines 33–60
export default function SettingsModal(): React.Node {
const {isModalShowing, setIsModalShowing} = useContext(SettingsModalContext);
const store = useContext(StoreContext);
const {profilerStore} = store;
// Updating preferences while profiling is in progress could break things (e.g. filtering)
// Explicitly disallow it for now.
const isProfilingSubscription = useMemo(
() => ({
getCurrentValue: () => profilerStore.isProfilingBasedOnUserInput,
subscribe: (callback: Function) => {
profilerStore.addListener('isProfiling', callback);
return () => profilerStore.removeListener('isProfiling', callback);
},
}),
[profilerStore],
);
const isProfiling = useSubscription<boolean>(isProfilingSubscription);
if (isProfiling && isModalShowing) {
setIsModalShowing(false);
}
if (!isModalShowing) {
return null;
}
return <SettingsModalImpl store={store} />;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does SettingsModal() do?
SettingsModal() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js.
Where is SettingsModal() defined?
SettingsModal() is defined in packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js at line 33.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free