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

Function fetchPosts

examples/solid/basic-solid-query-file-based/src/posts.tsx:27–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 3

infoMethod · 0.65
thenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected