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

Function fetchPosts

e2e/react-router/basic-react-query/src/posts.ts:18–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18const fetchPosts = async () => {
19 console.info('Fetching posts...')
20 return axios
21 .get<Array<PostType>>(`${queryURL}/posts`)
22 .then((r) => r.data.slice(0, 10))
23}
24
25const fetchPost = async (postId: string) => {
26 console.info(`Fetching post with id ${postId}...`)

Callers 1

posts.tsFile · 0.70

Calls 3

infoMethod · 0.65
thenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected