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

Function fetchPosts

examples/solid/basic-default-search-params/src/main.tsx:26–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26const fetchPosts = async () => {
27 console.info('Fetching posts...')
28 await new Promise((r) => setTimeout(r, 300))
29 return axios
30 .get<Array<PostType>>('https://jsonplaceholder.typicode.com/posts')
31 .then((r) => r.data.slice(0, 10))
32}
33
34const fetchPost = async (postId: number) => {
35 console.info(`Fetching post with id ${postId}...`)

Callers 1

main.tsxFile · 0.70

Calls 3

infoMethod · 0.65
thenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected