MCPcopy Index your code
hub / github.com/callstack/react-theme-provider / useTheme

Function useTheme

src/createTheming.js:32–41  ·  view source on GitHub ↗
(overrides?: $DeepShape<T>)

Source from the content-addressed store, hash-verified

30 );
31
32 const useTheme = (overrides?: $DeepShape<T>): T => {
33 const theme = React.useContext(ThemeContext);
34 const result = React.useMemo(
35 () =>
36 theme && overrides ? deepmerge(theme, overrides) : theme || overrides,
37 [theme, overrides]
38 );
39
40 return result;
41 };
42
43 return {
44 ThemeContext,

Callers 1

PropsCheckerFunction · 0.85

Calls

no outgoing calls

Tested by 1

PropsCheckerFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…