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

Function fetchPosts

e2e/solid-router/js-only-file-based/src/posts.js:7–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5const queryURL = 'https://jsonplaceholder.typicode.com'
6
7export const fetchPosts = async () => {
8 console.info('Fetching posts...')
9 return axios.get(`${queryURL}/posts`).then((r) => r.data.slice(0, 10))
10}
11
12export const fetchPost = async (postId) => {
13 console.info(`Fetching post with id ${postId}...`)

Callers 1

posts.tsxFile · 0.90

Calls 3

infoMethod · 0.65
thenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected