Unable to get functional components to work with my Next.js app

and what version of @plasmicapp/loader-nextjs?

"@plasmicapp/loader-nextjs": "^1.0.107",

what does your http://localhost:3000/plasmic-host look like?

you can see a version here: https://staging.rampedcareers.com/plasmic-host

oh great; what’s your project ID?

"5rZNQCcEeqnxNxXq7nEieD"

could you show me your _app.js?

hmm looks like this is the culprit:

image.png

do you know where that style is from?

I can look, where are you seeing that?

looks like a global css style… it is on every page

I can look into removing it, what should it be/why is it causing an issue here?

it normally doesn’t have any styles out of the box for a nextjs app, so you may have a global css style setting those styles, maybe imported from your _app.js? Because the artboard is being rendered just after this __next div, and the __next div is 100% height, the artboard content is actually pushed down to just below where the artboard ends…

I see, I think I’ve found it, is there a way I can solve this without changing these styles globally/

Could you try adding this to your plasmic-host.tsx?

<style global jsx>{`
        #__next {
          height: unset;
        }
      `}</style>

Commenting it out globally fixed the display issue!

I renamed it to plasmic-host.js but I will try that

Great, thank you Chung! That appears to have fixed the style issue. So I’m able to see the stuff in the editor properly. However, I’m still not able to import functional components.

right now I don’t see any code components registered…

I just uncommented them