Next.js Discord

Discord Forum

Suspense Loading text not showing on Server component wrapped on client component

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
Hello all, I am unable to see the loading message in this case. The server component is fetching some data and it's provided in between the client component. Can someone help with loading

"use client"; const ShowData = () => { return ( <> <ClientComponent> <Suspense fallback={<p>Loading...</p>}> <ServerComponent /> </Suspense> </ClientComponent> </> ); }; export default ShowData ;

3 Replies

I've a question, why are you rendering a server component inside client component
Asiatic LionOP
@Anay-208 I am using react-marquee-fast package which is not working In Server Component. That's why used inside client component

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
In server component, set a random timeout before sending the response, and try inspecting and see whether loading is available in inspect