index.js — react Source File
Architecture documentation for index.js, a javascript file in the react codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR bc541b6e_9521_11e1_5e2b_622a6b2d721e["index.js"] bc8ae172_cc20_3692_943c_bbdb1ad34855["Fixture.js"] bc541b6e_9521_11e1_5e2b_622a6b2d721e --> bc8ae172_cc20_3692_943c_bbdb1ad34855 2851624d_a736_f3f6_2132_5a20630983fe["Fixture"] bc541b6e_9521_11e1_5e2b_622a6b2d721e --> 2851624d_a736_f3f6_2132_5a20630983fe a3aeab4c_4f93_b8d8_01c2_7a351a28a3fb["Fixture"] bc541b6e_9521_11e1_5e2b_622a6b2d721e --> a3aeab4c_4f93_b8d8_01c2_7a351a28a3fb 43315ad6_972b_89f2_a26c_ae2c6075675a["FixtureSet.js"] bc541b6e_9521_11e1_5e2b_622a6b2d721e --> 43315ad6_972b_89f2_a26c_ae2c6075675a f3e4d030_5f7e_b1af_0ae5_fcdf80961e8c["FixtureSet"] bc541b6e_9521_11e1_5e2b_622a6b2d721e --> f3e4d030_5f7e_b1af_0ae5_fcdf80961e8c 14dde3c9_48ef_6e34_3667_978d06aff15d["TestCase.js"] bc541b6e_9521_11e1_5e2b_622a6b2d721e --> 14dde3c9_48ef_6e34_3667_978d06aff15d e1e356f5_b085_dad5_a81f_4b4844381311["TestCase"] bc541b6e_9521_11e1_5e2b_622a6b2d721e --> e1e356f5_b085_dad5_a81f_4b4844381311 style bc541b6e_9521_11e1_5e2b_622a6b2d721e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Fixture from '../../Fixture';
import FixtureSet from '../../FixtureSet';
import TestCase from '../../TestCase';
const React = window.React;
const ReactDOM = window.ReactDOM;
const Suspense = React.Suspense;
let cache = new Set();
function AsyncStep({text, ms}) {
if (!cache.has(text)) {
throw new Promise(resolve =>
setTimeout(() => {
cache.add(text);
resolve();
}, ms)
);
}
return null;
}
let suspendyTreeIdCounter = 0;
class SuspendyTreeChild extends React.Component {
id = suspendyTreeIdCounter++;
state = {
step: 1,
isHidden: false,
};
increment = () => this.setState(s => ({step: s.step + 1}));
componentDidMount() {
document.addEventListener('keydown', this.onKeydown);
}
componentWillUnmount() {
document.removeEventListener('keydown', this.onKeydown);
}
onKeydown = event => {
if (event.metaKey && event.key === 'Enter') {
this.increment();
}
};
render() {
return (
<>
<Suspense fallback={<div>(display: none)</div>}>
<div>
<AsyncStep text={`${this.state.step} + ${this.id}`} ms={500} />
{this.props.children}
</div>
</Suspense>
<button onClick={this.increment}>Hide</button>
</>
);
}
}
// ... (264 more lines)
Domain
Subdomains
Functions
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, Entrypoint subdomain.
What functions are defined in index.js?
index.js defines 1 function(s): AsyncStep.
What does index.js depend on?
index.js imports 7 module(s): Fixture, Fixture, Fixture.js, FixtureSet, FixtureSet.js, TestCase, TestCase.js.
Where is index.js in the architecture?
index.js is located at fixtures/dom/src/components/fixtures/suspense/index.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/dom/src/components/fixtures/suspense).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free