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

Function usePost

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

Source from the content-addressed store, hash-verified

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

Callers 1

PostFunction · 0.70

Calls 1

getPostByIdFunction · 0.70

Tested by

no test coverage detected