Socket
Socket
Sign inDemoInstall

@cloudcannon/react-connector

Package Overview
Dependencies
4
Maintainers
6
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

54

index.js

@@ -1,35 +0,37 @@

import React from 'react';
const React = require('react');
export default function CloudCannonConnect(Component) {
return class LivePageComponent extends React.Component{
constructor(props) {
super(props);
this.state = {}
}
componentDidMount() {
window.CloudCannon = {
trigger: (eventName, frontMatter) => {
this.setState(frontMatter);
module.exports = {
CloudCannonConnect: function (Component) {
return class LivePageComponent extends React.Component{
constructor(props) {
super(props);
this.state = {}
}
componentDidMount() {
window.CloudCannon = {
trigger: (eventName, frontMatter) => {
this.setState(frontMatter);
}
};
}
componentWillUnmount() {
if (window.CloudCannon) {
window.CloudCannon.trigger = null;
}
};
}
componentWillUnmount() {
if (window.CloudCannon) {
window.CloudCannon.trigger = null;
}
}
render() {
const hydratedProps = {
...this.props,
page: {
...this.props.page,
...this.state,
render() {
const hydratedProps = {
...this.props,
page: {
...this.props.page,
...this.state,
}
}
return React.createElement(Component, hydratedProps, null);
}
return React.createElement(Component, hydratedProps, null);
}
}
}
{
"name": "@cloudcannon/react-connector",
"version": "1.0.2",
"version": "1.0.3",
"description": "A React connector for activating live visual editing in CloudCannon",
"main": "index.js",
"type": "module",
"scripts": {

@@ -8,0 +7,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc