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

Function usePost

examples/react/https/src/index.tsx:84–90  ·  view source on GitHub ↗
(postId: number)

Source from the content-addressed store, hash-verified

82}
83
84function usePost(postId: number) {
85 return useQuery({
86 queryKey: ['post', postId],
87 queryFn: () => getPostById(postId),
88 enabled: !!postId,
89 })
90}
91
92function Post({
93 postId,

Callers 1

PostFunction · 0.70

Calls 1

getPostByIdFunction · 0.70

Tested by

no test coverage detected