MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / fetchData

Function fetchData

suspense-error-boundary/src/App6.tsx:3–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useEffect, useState } from "react";
2
3function fetchData(): Promise<{name: string}> {
4 return new Promise(resolve => {
5 setTimeout(() => {
6 resolve({
7 name: 'guang'
8 });
9 }, 2000)
10 })
11}
12
13export default function App() {
14 const [loading, setLoading] = useState(false);

Callers 1

loadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected