I think it would be useful to implement an event type prop. When creating components (usually buttons), there are situations where different events should be triggered depending on how the component is used. Currently, this is not possible.
The workaround I am using is defining a prop with the image type. Since image props are generated as void*, I can later pass an event callback instead of an image pointer.
It would be cleaner and safer if the framework supported a dedicated event prop type that could be used to attach event handlers directly to components.
I think it would be useful to implement an
eventtype prop. When creating components (usually buttons), there are situations where different events should be triggered depending on how the component is used. Currently, this is not possible.The workaround I am using is defining a prop with the
imagetype. Since image props are generated asvoid*, I can later pass an event callback instead of an image pointer.It would be cleaner and safer if the framework supported a dedicated
eventprop type that could be used to attach event handlers directly to components.