index.js — react Source File
Architecture documentation for index.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a0507bb6_7cf5_071e_db51_f9f50de2969a["index.js"] ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] a0507bb6_7cf5_071e_db51_f9f50de2969a --> ac587885_e294_a1e9_b13f_5e7b920fdb42 style a0507bb6_7cf5_071e_db51_f9f50de2969a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @flow */
import * as React from 'react';
import {Fragment, useEffect, useRef, useState} from 'react';
// $FlowFixMe[missing-local-annot]
function WarnDuringRender({children = null}) {
console.warn('This warning fires during every render');
return children;
}
// $FlowFixMe[missing-local-annot]
function WarnOnMount({children = null}) {
useEffect(() => {
console.warn('This warning fires on initial mount only');
}, []);
return children;
}
// $FlowFixMe[missing-local-annot]
function WarnOnUpdate({children = null}) {
const didMountRef = useRef(false);
useEffect(() => {
if (didMountRef.current) {
console.warn('This warning fires on every update');
} else {
didMountRef.current = true;
}
});
return children;
}
// $FlowFixMe[missing-local-annot]
function WarnOnUnmount({children = null}) {
useEffect(() => {
return () => {
console.warn('This warning fires on unmount');
};
}, []);
return children;
}
// $FlowFixMe[missing-local-annot]
function ErrorDuringRender({children = null}) {
console.error('This error fires during every render');
return children;
}
// $FlowFixMe[missing-local-annot]
function ErrorOnMount({children = null}) {
useEffect(() => {
console.error('This error fires on initial mount only');
}, []);
return children;
}
// $FlowFixMe[missing-local-annot]
function ErrorOnUpdate({children = null}) {
const didMountRef = useRef(false);
useEffect(() => {
// ... (148 more lines)
Domain
Subdomains
Functions
- ComponentWithMissingKey()
- ComponentWithSymbolWarning()
- DuplicateWarningsAndErrors()
- ErrorAndWarningDuringRender()
- ErrorAndWarningOnMount()
- ErrorAndWarningOnUnmount()
- ErrorAndWarningOnUpdate()
- ErrorDuringRender()
- ErrorOnMount()
- ErrorOnUnmount()
- ErrorOnUpdate()
- ErrorWithMultipleArgs()
- ErrorWithStringSubstitutions()
- ErrorsAndWarnings()
- MultipleWarningsAndErrors()
- ReactErrorOnHostComponent()
- ReallyLongErrorMessageThatWillCauseTextToBeTruncated()
- WarnDuringRender()
- WarnOnMount()
- WarnOnUnmount()
- WarnOnUpdate()
Dependencies
- react
Source
Frequently Asked Questions
What does index.js do?
index.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in index.js?
index.js defines 21 function(s): ComponentWithMissingKey, ComponentWithSymbolWarning, DuplicateWarningsAndErrors, ErrorAndWarningDuringRender, ErrorAndWarningOnMount, ErrorAndWarningOnUnmount, ErrorAndWarningOnUpdate, ErrorDuringRender, ErrorOnMount, ErrorOnUnmount, and 11 more.
What does index.js depend on?
index.js imports 1 module(s): react.
Where is index.js in the architecture?
index.js is located at packages/react-devtools-shell/src/app/InlineWarnings/index.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-shell/src/app/InlineWarnings).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free