Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
84
function usePost(postId: number) {
85
return useQuery({
86
queryKey: [
'post'
, postId],
87
queryFn: () => getPostById(postId),
88
enabled: !!postId,
89
})
90
}
91
92
function Post({
93
postId,
Callers
1
Post
Function · 0.70
Calls
1
getPostById
Function · 0.70
Tested by
no test coverage detected