MCPcopy Create free account
hub / github.com/TanStack/devtools / Home

Function Home

examples/react/start/src/routes/demo/start.api-request.tsx:21–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19})
20
21function Home() {
22 const [names, setNames] = useState<Array<string>>([])
23
24 useEffect(() => {
25 getNames().then(setNames)
26 }, [])
27
28 return (
29 <div
30 className="flex items-center justify-center min-h-screen p-4 text-white"
31 style={{
32 backgroundColor: '#000',
33 backgroundImage:
34 'radial-gradient(ellipse 60% 60% at 0% 100%, #444 0%, #222 60%, #000 100%)',
35 }}
36 >
37 <div className="w-full max-w-2xl p-8 rounded-xl backdrop-blur-md bg-black/50 shadow-xl border-8 border-black/10">
38 <h1 className="text-2xl mb-4">Start API Request Demo - Names List</h1>
39 <ul className="mb-4 space-y-2">
40 {names.map((name) => (
41 <li
42 key={name}
43 className="bg-white/10 border border-white/20 rounded-lg p-3 backdrop-blur-sm shadow-md"
44 >
45 <span className="text-lg text-white">{name}</span>
46 </li>
47 ))}
48 </ul>
49 </div>
50 </div>
51 )
52}

Callers

nothing calls this directly

Calls 1

getNamesFunction · 0.70

Tested by

no test coverage detected