Pass props from server to registered code components

Hey, I’m trying to pass information from the server-side of a ‘catchall’ page to a registered code component, but it’s not working as expected and I couldn’t find any information about it in your documentation.

Code example:

<PlasmicComponent component={pageMeta.displayName} componentProps={{ foo: 'baa' }} />

Can you please explain in detail how this component and its prop work? Alternatively, is using global context the only way to achieve this?

Your code example is correct. This is adding foo: 'bar' to the page pageMeta.displayName component. Are you trying to add this prop to a code component that is inside the page?

You might want to try naming your component and overriding its props like this Overriding props on elements | Learn Plasmic.

      <PlasmicComponent
        component={pageMeta.displayName}
        componentProps={{ compName: { props: { foo: "baa" } } }}
      />