Home / Function/ ThemeProvider() — react Function Reference

ThemeProvider() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b36f71ce_7163_22e3_79d7_b73d86269e76["ThemeProvider()"]
  4d06d539_1d59_0b26_1097_d40ffb862127["ThemeProvider.js"]
  b36f71ce_7163_22e3_79d7_b73d86269e76 -->|defined in| 4d06d539_1d59_0b26_1097_d40ffb862127
  1d2b9513_4ad1_d535_e552_1bdcc4a6fe7b["useThemeStyles()"]
  b36f71ce_7163_22e3_79d7_b73d86269e76 -->|calls| 1d2b9513_4ad1_d535_e552_1bdcc4a6fe7b
  style b36f71ce_7163_22e3_79d7_b73d86269e76 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/devtools/views/ThemeProvider.js lines 13–29

export default function ThemeProvider({
  children,
}: {
  children: React.Node,
}): React.Node {
  const themeStyle = useThemeStyles();

  const style = React.useMemo(() => {
    return {
      ...themeStyle,
      width: '100%',
      height: '100%',
    };
  }, [themeStyle]);

  return <div style={style}>{children}</div>;
}

Domain

Subdomains

Frequently Asked Questions

What does ThemeProvider() do?
ThemeProvider() is a function in the react codebase, defined in packages/react-devtools-shared/src/devtools/views/ThemeProvider.js.
Where is ThemeProvider() defined?
ThemeProvider() is defined in packages/react-devtools-shared/src/devtools/views/ThemeProvider.js at line 13.
What does ThemeProvider() call?
ThemeProvider() calls 1 function(s): useThemeStyles.

Analyze Your Own Codebase

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

Try Supermodel Free