useExtensionComponentsPanelVisibility() — react Function Reference
Architecture documentation for the useExtensionComponentsPanelVisibility() function in useExtensionComponentsPanelVisibility.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 288b9cae_fd7d_fdfa_f79e_e3d8086fa0cd["useExtensionComponentsPanelVisibility()"] 9623aa84_a4dd_27fc_019b_f7dc6e8453ad["useExtensionComponentsPanelVisibility.js"] 288b9cae_fd7d_fdfa_f79e_e3d8086fa0cd -->|defined in| 9623aa84_a4dd_27fc_019b_f7dc6e8453ad style 288b9cae_fd7d_fdfa_f79e_e3d8086fa0cd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/frontend/hooks/useExtensionComponentsPanelVisibility.js lines 15–38
export function useExtensionComponentsPanelVisibility(
bridge: FrontendBridge,
): boolean {
const [isVisible, setIsVisible] = useState(true);
useEffect(() => {
function onPanelShown() {
setIsVisible(true);
}
function onPanelHidden() {
setIsVisible(false);
}
bridge.addListener('extensionComponentsPanelShown', onPanelShown);
bridge.addListener('extensionComponentsPanelHidden', onPanelHidden);
return () => {
bridge.removeListener('extensionComponentsPanelShown', onPanelShown);
bridge.removeListener('extensionComponentsPanelHidden', onPanelHidden);
};
}, [bridge]);
return isVisible;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does useExtensionComponentsPanelVisibility() do?
useExtensionComponentsPanelVisibility() is a function in the react codebase, defined in packages/react-devtools-shared/src/frontend/hooks/useExtensionComponentsPanelVisibility.js.
Where is useExtensionComponentsPanelVisibility() defined?
useExtensionComponentsPanelVisibility() is defined in packages/react-devtools-shared/src/frontend/hooks/useExtensionComponentsPanelVisibility.js at line 15.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free