MCPcopy Index your code
hub / github.com/jamiebuilds/react-loadable / createLoader

Function createLoader

__tests__/test.js:14–24  ·  view source on GitHub ↗
(delay, loader, error)

Source from the content-addressed store, hash-verified

12}
13
14function createLoader(delay, loader, error) {
15 return () => {
16 return waitFor(delay).then(() => {
17 if (loader) {
18 return loader();
19 } else {
20 throw error;
21 }
22 });
23 };
24}
25
26function MyLoadingComponent(props) {
27 return <div>MyLoadingComponent {JSON.stringify(props)}</div>;

Callers 1

test.jsFile · 0.85

Calls 1

waitForFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…