Next13 layout (app dir) rendering child client component out of order?
Unanswered
Polar bear posted this in #help-forum
Polar bearOP
I've got a simple layout. For some reason, on first render, the
Worth mentioning that
MainMenuWrapper appears AFTER {children} -- if I navigate on the client, the MainMenuWrapper pops back into place where it should be. const RootLayout = ({
children,
}: {
children: React.ReactNode;
}) => {
return (
<div>
<AnalyticsWrapper />
<MainMenuWrapper />
{children}
<HelpCta />
</div>
);
}
export default RootLayout;Worth mentioning that
MainMenuWrapper loads the menu data and then renders a Client Component with the data retrieved server-side. That's the only "interesting" thing about that component versus it's sibling components.