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

Function PostRouteComponent

e2e/solid-router/basic-solid-query/src/main.tsx:151–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149})
150
151function PostRouteComponent() {
152 const params = postRoute.useParams()
153 const postQuery = useQuery(() => postQueryOptions(params().postId))
154 const post = createMemo(() => postQuery.data)
155
156 return (
157 <div class="space-y-2">
158 <h4 class="text-xl font-bold underline">{post()?.title}</h4>
159 <div class="text-sm">{post()?.body}</div>
160 </div>
161 )
162}
163
164const layoutRoute = createRoute({
165 getParentRoute: () => rootRoute,

Callers

nothing calls this directly

Calls 1

postQueryOptionsFunction · 0.90

Tested by

no test coverage detected