Clarification On Dynamic Server Components
Unanswered
Brown bear posted this in #help-forum
Brown bearOP
Hi, just wanted to confirm i understood it correctly. Let's say I have the following
Does it make sense to make the ServerComponent dynamic?
Will it still correctly do a full SSR and then serve the compiled static component?
export default function ServerComponent() {
const value = expensiveChildren{}
return (
<ClientComponent>
{value}
</ClientComponent>
);
}
Does it make sense to make the ServerComponent dynamic?
import dynamic from 'next/dynamic';
const DynamicServerComponent = dynamic(() => import('./ServerComponent'), {
loading: () => <p>Loading server stuff…</p>,
});
Will it still correctly do a full SSR and then serve the compiled static component?