You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the improvement or update you wish to see?
h
async function fetchUsers(id) { // here fetchUsers should be change to fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}
Is there any context that might help us understand?
async function fetchUsers(id) { // Here instead of fetchUsers it should be fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}
export default async function Profile({ params }) {
const user = await fetchUser(params.id)
if (!user) {
notFound()
}
// ...
}
### Does the docs page already exist? Please link to it.
https://nextjs.org/docs/app/api-reference/functions/not-found
The text was updated successfully, but these errors were encountered:
#52486
Here I fixed the typo error of fetchUsers to fetchUser in
docs/api-reference/04-functions/not-found.mdx
async function fetchUser(id) { // Here instead of fetchUsers i changed
it to fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}
export default async function Profile({ params }) {
const user = await fetchUser(params.id)
if (!user) {
notFound()
}
// ...
}
https://nextjs.org/docs/app/api-reference/functions/not-found
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
What is the improvement or update you wish to see?
h
async function fetchUsers(id) { // here fetchUsers should be change to fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}
Is there any context that might help us understand?
async function fetchUsers(id) { // Here instead of fetchUsers it should be fetchUser
const res = await fetch('https://...')
if (!res.ok) return undefined
return res.json()
}
export default async function Profile({ params }) {
const user = await fetchUser(params.id)
if (!user) {
notFound()
}
// ...
}
The text was updated successfully, but these errors were encountered: