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

Function PostRouteComponent

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

postQueryOptionsFunction · 0.90

Tested by

no test coverage detected