How to use a Plasmic Select in the loader API?

How do we use the Plasmic Select component in Loader API. The following code throws an error. PFA

image.png

Hi Asim. This was supposed to be working like this, maybe this is a bug. We’re investigating it.

Can you try this:

const Select = usePlasmicComponent("PFSelect");
return (
  <Select>
    <Select.Option>...
);

@chungwu It does work. Thanks.
I was looking for a similar API which will return the component itself. :+1:

Is this hook documentation available in the current docs?
Are there any performance tradeoffs between using the hook and using PlasmicComponent?

oh! I guess we did not document this :sweat_smile: No difference – PlasmicComponent internally uses usePlasmicComponent. Would still recommend using PlasmicComponent most of the time, as it does more than just usePlasmicComponent