MCPcopy Create free account
hub / github.com/TanStack/router / UsersComponent

Function UsersComponent

e2e/solid-start/basic/src/routes/users.tsx:20–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18})
19
20function UsersComponent() {
21 const users = Route.useLoaderData()
22
23 return (
24 <div class="p-2 flex gap-2">
25 <ul class="list-disc pl-4">
26 {[
27 ...users(),
28 { id: 'i-do-not-exist', name: 'Non-existent User', email: '' },
29 ].map((user) => {
30 return (
31 <li class="whitespace-nowrap">
32 <Link
33 to="/users/$userId"
34 params={{
35 userId: String(user.id),
36 }}
37 class="block py-1 text-blue-800 hover:text-blue-600"
38 activeProps={{ class: 'text-black font-bold' }}
39 >
40 <div>{user.name}</div>
41 </Link>
42 </li>
43 )
44 })}
45 </ul>
46 <hr />
47 <Outlet />
48 </div>
49 )
50}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected