react-2-webcomponent
Advanced tools
+1
-1
| { | ||
| "name": "react-2-webcomponent", | ||
| "version": "2.0.0", | ||
| "version": "2.0.1", | ||
| "description": "Convert react components to native Web Components.", | ||
@@ -5,0 +5,0 @@ "main": "react-2-webcomponent", |
+5
-8
@@ -1,6 +0,6 @@ | ||
| # react-to-webcomponent | ||
| # react-2-webcomponent | ||
| `react-to-webcomponent` converts [React](https://reactjs.org/) components to [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)! It lets you share react components as native elements that __don't__ require mounted being through React. The custom element acts as a wrapper for the underlying react component. Use these custom elements in any framework (vue, svelte, angular, ember, canjs) the same way you would use standard HTML elements. | ||
| `react-2-webcomponent` converts [React](https://reactjs.org/) components to [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)! It lets you share react components as native elements that __don't__ require mounted being through React. The custom element acts as a wrapper for the underlying react component. Use these custom elements in any framework (vue, svelte, angular, ember, canjs) the same way you would use standard HTML elements. | ||
| `react-to-webcomponent`: | ||
| `react-2-webcomponent`: | ||
@@ -25,3 +25,3 @@ - Works in all modern browsers. (Edge needs a [customElements polyfill](https://github.com/webcomponents/polyfills/tree/master/packages/custom-elements)). | ||
| ```js | ||
| import reactToWebComponent from "react-to-webcomponent"; | ||
| import reactToWebComponent from "react-2-webcomponent"; | ||
@@ -93,9 +93,6 @@ const WebGreeting = reactToWebComponent(Greeting, React, ReactDOM); | ||
| ``` | ||
| npm i react-to-webcomponent | ||
| https://github.com/satty1987/react-to-webcomponent | ||
| ``` | ||
| #### CodePen | ||
| [Greeting example in a CodePen](https://codepen.io/justinbmeyer/pen/gOYrQax?editors=1010) | ||
| ## API | ||
@@ -102,0 +99,0 @@ |
14262
-0.59%150
-1.96%