I am trying to apply Loader to a page that displays data fetched by a GraphQL query. For the same, I tried the following:
<Suspense fallback={<Loader />}>
<div>
{fetched data}
</div
</Suspense>
But using this, The React.Suspense component throws an internal error –
Uncaught Error: window is not defined
This image provides the detailed error
I want the Loader to work normally without any error using Suspense or any other method in NextJS 14. Any ideas about how to achieve this?