New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-web-component

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-web-component - npm Package Compare versions

Comparing version 1.0.13-alpha to 1.0.14

4

package.json
{
"name": "react-web-component",
"version": "1.0.13-alpha",
"version": "1.0.14",
"description": "Create Web Components with React",

@@ -11,4 +11,4 @@ "main": "src/index.js",

"react-dom": "^16.0.0",
"react-shadow-dom-retarget-events": "^1.0.7"
"react-shadow-dom-retarget-events": "^1.0.8"
}
}

@@ -48,2 +48,24 @@ <p align="center">

It is also possible to create multiple web components in a single project and pass on props:
```javascript
import React from 'react';
import ReactWebComponent from 'react-web-component';
class MyComponent extends React.Component {
render() {
return <div>Hello World!</div>;
}
}
class AnotherComponent extends React.Component {
render() {
return <div>Hello {this.props.name}!</div>;
}
}
ReactWebComponent.create(<MyComponent />, 'my-component');
ReactWebComponent.create(<AnotherComponent name="Mars" />, 'another-component');
```
Note that `react-web-component` does not limit you in the complexity of your React component. You can pass an entire single page application in your web component if you need to.

@@ -87,2 +109,3 @@

Parameters passed to the web component methods will also be proxied to the react component.

@@ -89,0 +112,0 @@ ## Adding CSS to your web component using `react-web-component-style-loader`

@@ -45,3 +45,3 @@ const ReactDOM = require('react-dom');

for (var i = 0; i < styles.length; i++) {
shadowRoot.appendChild(styles[i])
shadowRoot.appendChild(styles[i].cloneNode(true));
}

@@ -48,0 +48,0 @@ shadowRoot.appendChild(mountPoint);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc