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

Function getPostById

examples/react/basic/src/index.tsx:77–82  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

75 )
76}
77
78const getPostById = async (id: number): Promise<Post> => {
79 const response = await fetch(
80 `https://jsonplaceholder.typicode.com/posts/${id}`,
81 )
82 return await response.json()
83}
84
85function usePost(postId: number) {

Callers 1

usePostFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected