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

Function fetchPosts

examples/react/basic-virtual-inside-file-based/src/posts.tsx:26–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26export const fetchPosts = async () => {
27 console.info('Fetching posts...')
28 await new Promise((r) => setTimeout(r, 500))
29 return axios
30 .get<Array<PostType>>('https://jsonplaceholder.typicode.com/posts')
31 .then((r) => r.data.slice(0, 10))
32}

Callers

nothing calls this directly

Calls 3

infoMethod · 0.65
thenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected