Component() — react Function Reference
Architecture documentation for the Component() function in ComponentUsingHooksIndirectly.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD b64ca4f1_1f03_44a1_6db9_c8f5af3bb9fd["Component()"] 41d40610_17c0_c6c9_6fbb_87f5574a1169["ComponentUsingHooksIndirectly.js"] b64ca4f1_1f03_44a1_6db9_c8f5af3bb9fd -->|defined in| 41d40610_17c0_c6c9_6fbb_87f5574a1169 05a7e60f_4ec5_8044_1e2c_a58f408a1a79["useIsDarkMode()"] b64ca4f1_1f03_44a1_6db9_c8f5af3bb9fd -->|calls| 05a7e60f_4ec5_8044_1e2c_a58f408a1a79 style b64ca4f1_1f03_44a1_6db9_c8f5af3bb9fd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/external/react-sources-extended/index-map/ComponentUsingHooksIndirectly.js lines 16–47
function Component() {
const countState = (0, _react.useState)(0);
const count = countState[0];
const setCount = countState[1];
const darkMode = useIsDarkMode();
const [isDarkMode] = darkMode;
(0, _react.useEffect)(() => {// ...
}, []);
const handleClick = () => setCount(count + 1);
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
__source: {
fileName: _jsxFileName,
lineNumber: 28,
columnNumber: 7
}
}, "Dark mode? ", isDarkMode), /*#__PURE__*/_react.default.createElement("div", {
__source: {
fileName: _jsxFileName,
lineNumber: 29,
columnNumber: 7
}
}, "Count: ", count), /*#__PURE__*/_react.default.createElement("button", {
onClick: handleClick,
__source: {
fileName: _jsxFileName,
lineNumber: 30,
columnNumber: 7
}
}, "Update count"));
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does Component() do?
Component() is a function in the react codebase, defined in packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/external/react-sources-extended/index-map/ComponentUsingHooksIndirectly.js.
Where is Component() defined?
Component() is defined in packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/external/react-sources-extended/index-map/ComponentUsingHooksIndirectly.js at line 16.
What does Component() call?
Component() calls 1 function(s): useIsDarkMode.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free