-
I'm creating a generic DS that can be used with other framework. I'm struggling to recreate normal element like input or button. Specifically I would like to have a custom component that behave exactly like a button and so when mounted in a form, if clicked, will trigger the submit event. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @huvber . An excellent topic to discuss. With Atomico, you can achieve it, and to make it easier, we have certain utilities like
I hope it is useful to you and I will be attentive to what you need. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for the reply, it works like that. I found a little odd the need to declare 2 different elements, but I understand the reasons. Thanks a lot for the example again! |
Beta Was this translation helpful? Give feedback.
Hi @huvber . An excellent topic to discuss. With Atomico, you can achieve it, and to make it easier, we have certain utilities like
useRender
. This hook allows you to render a fragment in the lightDOM separately from what you render in the ShadowDOM. This is useful for achieving the effect you mentioned. I'm attaching documentation on this and an example of your goal.I hope it is useful to you and I will be attentive to what you n…