index.js — react Source File
Architecture documentation for index.js, a javascript file in the react codebase. 8 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR b6b3cf8a_4317_6da2_264c_e7cff7c932c6["index.js"] 7a306bc3_bbc5_e719_6911_64c744dcf0fd["Charts.js"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> 7a306bc3_bbc5_e719_6911_64c744dcf0fd f4df3a91_6c44_d711_f000_dd1eb50d4ac0["Charts"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> f4df3a91_6c44_d711_f000_dd1eb50d4ac0 3a7e99dd_a5c5_f3c7_9c40_65dc549077bf["Clock.js"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> 3a7e99dd_a5c5_f3c7_9c40_65dc549077bf 85a7bb5e_f42b_35c7_ce24_22564222542f["Clock"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> 85a7bb5e_f42b_35c7_ce24_22564222542f 86a17dde_2af5_3715_0bc0_5db6777e9c0d["index.css"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> 86a17dde_2af5_3715_0bc0_5db6777e9c0d ac587885_e294_a1e9_b13f_5e7b920fdb42["react"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> ac587885_e294_a1e9_b13f_5e7b920fdb42 8792c1c1_dca5_f137_73ea_c0e268fdbb22["client"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> 8792c1c1_dca5_f137_73ea_c0e268fdbb22 69b1a3e0_b7bd_2fed_32d7_f48a63004937["lodash"] b6b3cf8a_4317_6da2_264c_e7cff7c932c6 --> 69b1a3e0_b7bd_2fed_32d7_f48a63004937 style b6b3cf8a_4317_6da2_264c_e7cff7c932c6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import React, {PureComponent, startTransition} from 'react';
import {createRoot} from 'react-dom/client';
import _ from 'lodash';
import Charts from './Charts';
import Clock from './Clock';
import './index.css';
let cachedData = new Map();
class App extends PureComponent {
state = {
value: '',
strategy: 'sync',
showDemo: true,
showClock: false,
};
// Random data for the chart
getStreamData(input) {
if (cachedData.has(input)) {
return cachedData.get(input);
}
const multiplier = input.length !== 0 ? input.length : 1;
const complexity =
(parseInt(window.location.search.slice(1), 10) / 100) * 25 || 25;
const data = _.range(5).map(t =>
_.range(complexity * multiplier).map((j, i) => {
return {
x: j,
y: (t + 1) * _.random(0, 255),
};
})
);
cachedData.set(input, data);
return data;
}
componentDidMount() {
window.addEventListener('keydown', e => {
if (e.key.toLowerCase() === '?') {
e.preventDefault();
this.setState(state => ({
showClock: !state.showClock,
}));
}
});
}
handleChartClick = e => {
if (this.state.showDemo) {
if (e.shiftKey) {
this.setState({showDemo: false});
}
return;
}
if (this.state.strategy !== 'async') {
this.setState(state => ({
showDemo: !state.showDemo,
}));
return;
// ... (87 more lines)
Domain
Subdomains
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 does index.js depend on?
index.js imports 8 module(s): Charts, Charts.js, Clock, Clock.js, client, index.css, lodash, react.
Where is index.js in the architecture?
index.js is located at fixtures/concurrent/time-slicing/src/index.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/concurrent/time-slicing/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free