Comment on page
Wrapper for React
Atomico allows distributing webcomponnets with extended react support, automatically creating wrappers for each component and import paths for react.
For this to be possible you must follow the following rules.
Example 1
Example 2
import {Component} from "./component";
export {Component} from "./component";
customElements.define("my-component", MyComponent);
import {c} from "./my-component";
function component(){
return <host></host>;
}
export const Component = c(c);
customElements.define("my-component", Component);
exports ./dist/**/* ./types/**/* --wrappers
The result of this process will be:
- 1.The association of exports for React inside the package.json
- 2.The creation of the files of use for React, if the component is created with Atomico adds support to types.
Last modified 4mo ago