Next.js Discord

Discord Forum

Notfound() errors

Unanswered
Elite posted this in #help-forum
Open in Discord
when i return notfound on a null data fetch, i get a bunch of warnings like:
app-index.js:34 Warning: validateDOMNesting(...): <html> cannot appear as a child of <body>. and app-index.js:34 Warning: You are mounting a new html component when a previous one has not first unmounted. It is an error to render more than one html component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <html> and if you need to mount a new one, ensure any previous ones have unmounted first.

but if i return an h1, it works fine

0 Replies