One of the best aspects of Plasmic (codegen) is the ease of composition.
Lets say I have a component called Header
and it has an element/component called Avatar
Lets say the < Header > is called in another component called DashboardLayout.
I don’t need to have an onClick for example inside of the Header.tsx file and pass down a handler fn to the Header component
I can simply use the override prop for the element in question:
< Header avatar={{ onClick: handleAvatarClick }} /> inside of DashboardLayout.tsx where the < Header > is called.
so far so good. I have the logic in place where I want it.
But nowadays, I get a Type error every time I do that.
It still works. But I need to //@ts-ignore above this override prop!
Are you aware of this?
This has been bugging me for a while now.