Headless API with existing parts of page?

Can someone point me to any guidance on how to use the Headless API in an app while still rendering our own UI on either parts of a page (say a header / footer) ?

Based on the docs it seems like I can wrap the catch-all Plasmic page with whatever react I want to put something on every page. Or I can make a one-off plasmic page and wrap that for custom code per page.

How does one mix the two? Say in next.js – have the catchall page for Plasmic pages, but define specific routes for other pages. Though maybe this is more of a next.js question than a plasmic one:)

For wrapping in header/footer, you can simply have

<Header>
<PlasmicComponent .../>
<Footer>

You can have both catchall and one-off pages, like:

pages/one.tsx
pages/two.tsx
pages/[[...catchall]].tsx for anything else

Thanks!