How to handle the className warning when registering components?

What is the right way to handle className when registering components?

I am seeing this in a component that actually supports className , but I haven’t declared className as a prop when calling registerComponent.


just put the className prop on the components you dont need to register the className prop

function myComponenet ({className}) => (<div className={className}></div>)

It already has a className prop. Here is the code:

Is it possible that the class name is not being directed to the outermost comment on the component? The Plasmic Studio detection looks at the outermost root element for the class that is being injected.

This is important for things like layout styles to apply correctly, but if things are working fine for your requirements, then for now you can ignore it. We are discussing how to provide more escape hatches and configurability around class name props generally.