Home / Function/ useIsDarkMode() — react Function Reference

useIsDarkMode() — react Function Reference

Architecture documentation for the useIsDarkMode() function in ComponentUsingHooksIndirectly.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  b657073d_7798_8ad4_0ff2_034a6e1def9d["useIsDarkMode()"]
  bd3da7bb_e734_5469_589c_f9d345820d0b["ComponentUsingHooksIndirectly.js"]
  b657073d_7798_8ad4_0ff2_034a6e1def9d -->|defined in| bd3da7bb_e734_5469_589c_f9d345820d0b
  2c9de347_b4d7_4d14_089e_dee170679d10["Component()"]
  2c9de347_b4d7_4d14_089e_dee170679d10 -->|calls| b657073d_7798_8ad4_0ff2_034a6e1def9d
  style b657073d_7798_8ad4_0ff2_034a6e1def9d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/ComponentUsingHooksIndirectly.js lines 30–39

function useIsDarkMode() {
  const darkModeState = useState(false);
  const [isDarkMode] = darkModeState;

  useEffect(function useEffectCreate() {
    // Here is where we may listen to a "theme" event...
  }, []);

  return [isDarkMode, () => {}];
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does useIsDarkMode() do?
useIsDarkMode() is a function in the react codebase, defined in packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/ComponentUsingHooksIndirectly.js.
Where is useIsDarkMode() defined?
useIsDarkMode() is defined in packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/ComponentUsingHooksIndirectly.js at line 30.
What calls useIsDarkMode()?
useIsDarkMode() is called by 1 function(s): Component.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free