79206623

Date: 2024-11-20 09:50:51
Score: 0.5
Natty:
Report link

So I finally figured it out, I think but basically it came down to a styling problem in my code.

I'm using react and I had done the following in my layout.tsx

return (
    <SidebarProvider>
      {/* menu sidebar */}
      <AppSidebar />
      <div className="flex flex-col flex-1">
        {/* header */}
        <AppHeader />

        {/* main content */}
        <main className="flex-1">{children}</main>

        {/* footer */}
        <Footer />
      </div>
    </SidebarProvider>`

For whatever reason, I'm not a css expert, but it looks like the flex-1 in the <main> was conflicting with the parent div. All is to say that the parent div was already manaing the container size and after removing className="flex-1" from <main> all was working and no more recurring resizing.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Devon Stanton