Ignore root `layout.tsx` components when rendering page
Unanswered
Yellow-breasted Bunting posted this in #help-forum
Yellow-breasted BuntingOP
Hey all im writing a library to screenshot components in nextjs, I'll be using puppeteer to do this. My idea is to create a temporary new route e.g. "src/app/comp-preview/page.tsx" to load in the components to then screenshot. The problem is, if the user has anything in their root layout such as a nav, footer, cookie banner, it will show up on the page/screenshot. Is there a way to isolate a route from components inhereted by the root layout?
1 Reply
Yellow-breasted BuntingOP
I'd like to avoid asking users to wrap their project in a routes group