Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 586 Bytes

README.md

File metadata and controls

24 lines (16 loc) · 586 Bytes

@atomico/react

automatically create containers for React and Preact.

Example auto

import "@atomico/react/proxy"; // stores all customElements.define definitions before import
import { auto } from "@atomico/react";
import WebComponent from "./my-webcomponent";

export const ReactWebComponent = auto(WebComponent);

Example wrapper

import { wrapper } from "@atomico/react";
import WebComponent from "./my-webcomponent";

customElements.defined("web-component", WebComponent);

export const ReactWebComponent = wrapper("my-web-component", WebComponent);