effects
export const api = {
async getUser() {
const response = await fetch('/user')
return response.json()
},
async getItem(id) {
const response = await fetch(`/items/${id}`)
return response.json()
}
}Last updated
export const api = {
async getUser() {
const response = await fetch('/user')
return response.json()
},
async getItem(id) {
const response = await fetch(`/items/${id}`)
return response.json()
}
}Last updated