index.js — react Source File
Architecture documentation for index.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
const React = global.React;
const ReactDOM = global.ReactDOM;
class Counter extends React.unstable_AsyncComponent {
state = {counter: 0};
onCommit() {
setImmediate(() => {
this.setState(state => ({
counter: state.counter + 1,
}));
});
}
componentDidMount() {
this.onCommit();
}
componentDidUpdate() {
this.onCommit();
}
render() {
return <h1>{this.state.counter}</h1>;
}
}
const interval = 200;
function block() {
const endTime = performance.now() + interval;
while (performance.now() < endTime) {}
}
setInterval(block, interval);
// Should render a counter that increments approximately every second (the
// expiration time of a low priority update).
ReactDOM.render(<Counter />, document.getElementById('root'));
block();
Domain
Subdomains
Functions
Classes
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): block.
Where is index.js in the architecture?
index.js is located at fixtures/expiration/src/index.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/expiration/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free