Atomico and React
Last updated
Was this helpful?
Last updated
Was this helpful?
, this will allow to use custom tag with association of events and more, example:
Advantages: The react team will take care of the coverage of this characteristic.
Disadvantages: (Optional) The maintainer of the component must declare the types of the custom tag.
Although the use of the custom tag is a way of instantiating the component, many times it does not define the import path at the time of its use, complicating the resolution of the component's origin, to avoid this we recommend the use of the Atomico wrapper for React.
Atomico the package allows:
Create a Wrapper component for the custom Element
Avoid react conflicts with webcomponents, such as association of events, attributes, properties and children.
Reflect the types declared in Atomic to React, valid for JSX or TSX
All webcomponents work in Next if it escapes from SSR
Remember if you use the auto
module, it should always be imported first than the customElement to use, otherwise auto
will generate an id as a custom tag to instantiate the component within react
Coverage is automatic if you decide to share your package using under the following