Next.js Discord

Discord Forum

NoFound()

Unanswered
(-.-) posted this in #help-forum
Open in Discord
Hello folks, I have the following situation. I'm fetching data on my page, and when there are no items, can I use "not-found" to render an alternative UI? For instance, if my data search returns an empty array, should I call the "notFound()" function?

1 Reply

Spectacled bear
this is your personal preference if i've understood the question correctly