How to prevent loading.js from returning 200 on unknown routes while keeping loading states?
Unanswered
Oak apple gall wasp posted this in #help-forum
Oak apple gall waspOP
Hey,
I know that adding a loading.js file makes a Next.js app streamed — it returns a 200 response even for unknown routes, since the server first serves the loading screen with a 200 header.
I want to disable this behavior but still keep a loading state for better UX.
What’s the best solution for this, considering I’m also using a dynamic [locale] route for i18n around the whole app?
I know that adding a loading.js file makes a Next.js app streamed — it returns a 200 response even for unknown routes, since the server first serves the loading screen with a 200 header.
I want to disable this behavior but still keep a loading state for better UX.
What’s the best solution for this, considering I’m also using a dynamic [locale] route for i18n around the whole app?