Suspend.js — react Source File
Architecture documentation for Suspend.js, a javascript file in the react codebase. 0 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR 2006907a_93ec_a00c_a175_687728579478["Suspend.js"] 44fb6700_638f_2f39_6d45_bed99b6007a5["Page.js"] 44fb6700_638f_2f39_6d45_bed99b6007a5 --> 2006907a_93ec_a00c_a175_687728579478 13f7bfc1_77c5_77e8_b0d9_3713c3a81c00["Page2.js"] 13f7bfc1_77c5_77e8_b0d9_3713c3a81c00 --> 2006907a_93ec_a00c_a175_687728579478 style 2006907a_93ec_a00c_a175_687728579478 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
let promise = null;
let isResolved = false;
export default function Suspend({children}) {
// This will suspend the content from rendering but only on the client.
// This is used to demo a slow loading app.
if (!isResolved) {
if (promise === null) {
promise = new Promise(resolve => {
setTimeout(
() => {
isResolved = true;
resolve();
},
typeof window === 'object' ? 6000 : 1000
);
});
}
throw promise;
}
return children;
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does Suspend.js do?
Suspend.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 Suspend.js?
Suspend.js defines 1 function(s): Suspend.
What files import Suspend.js?
Suspend.js is imported by 2 file(s): Page.js, Page2.js.
Where is Suspend.js in the architecture?
Suspend.js is located at fixtures/ssr/src/components/Suspend.js (domain: BabelCompiler, subdomain: Entrypoint, directory: fixtures/ssr/src/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free