Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

react-r2d2

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-r2d2 - npm Package Compare versions

Comparing version
0.2.4
to
0.2.5
+11
-3
dist/r2d2.js

@@ -69,6 +69,8 @@ (function (global, factory) {

var isStoreValid = validateStore(_this.getSelectedState());
var selectedState = _this.getSelectedState();
var isStoreValid = validateStore(selectedState);
_this.setState({
valid: isStoreValid
valid: isStoreValid,
data: selectedState
});

@@ -171,2 +173,6 @@

if (!Alt.displayName) {
Alt.displayName = 'AltComponent';
}
if (!Alt || valid) {

@@ -198,3 +204,3 @@ return React__default.createElement(WrappedComponent, _extends({}, passThroughProps, {

validateStore: PropTypes.func,
altComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
altComponent: PropTypes.oneOfType([PropTypes.func])
};

@@ -209,2 +215,4 @@

R2D2.displayName = 'R2D2(' + (WrappedComponent.displayName || WrappedComponent.name || 'Component') + ')';
return R2D2;

@@ -211,0 +219,0 @@ }

@@ -63,6 +63,8 @@ import React, { Component } from 'react';

var isStoreValid = validateStore(_this.getSelectedState());
var selectedState = _this.getSelectedState();
var isStoreValid = validateStore(selectedState);
_this.setState({
valid: isStoreValid
valid: isStoreValid,
data: selectedState
});

@@ -165,2 +167,6 @@

if (!Alt.displayName) {
Alt.displayName = 'AltComponent';
}
if (!Alt || valid) {

@@ -192,3 +198,3 @@ return React.createElement(WrappedComponent, _extends({}, passThroughProps, {

validateStore: PropTypes.func,
altComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
altComponent: PropTypes.oneOfType([PropTypes.func])
};

@@ -203,2 +209,4 @@

R2D2.displayName = 'R2D2(' + (WrappedComponent.displayName || WrappedComponent.name || 'Component') + ')';
return R2D2;

@@ -205,0 +213,0 @@ }

@@ -68,6 +68,8 @@ 'use strict';

var isStoreValid = validateStore(_this.getSelectedState());
var selectedState = _this.getSelectedState();
var isStoreValid = validateStore(selectedState);
_this.setState({
valid: isStoreValid
valid: isStoreValid,
data: selectedState
});

@@ -170,2 +172,6 @@

if (!Alt.displayName) {
Alt.displayName = 'AltComponent';
}
if (!Alt || valid) {

@@ -197,3 +203,3 @@ return React__default.createElement(WrappedComponent, _extends({}, passThroughProps, {

validateStore: PropTypes.func,
altComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func])
altComponent: PropTypes.oneOfType([PropTypes.func])
};

@@ -208,2 +214,4 @@

R2D2.displayName = 'R2D2(' + (WrappedComponent.displayName || WrappedComponent.name || 'Component') + ')';
return R2D2;

@@ -210,0 +218,0 @@ }

{
"name": "react-r2d2",
"version": "0.2.4",
"version": "0.2.5",
"description": "HOC for dispatching an action automatically on component render",

@@ -24,5 +24,2 @@ "repository": "https://github.com/tomarrell/R2D2",

"dependencies": {
"chai": "^4.1.2",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"prop-types": "^15.6.1",

@@ -40,2 +37,5 @@ "react": "^16.2.0",

"babel-preset-react": "^6.24.1",
"chai": "^4.1.2",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"eslint": "^4.18.1",

@@ -47,2 +47,4 @@ "eslint-config-airbnb": "^16.1.0",

"eslint-plugin-react": "^7.7.0",
"jsdom": "^11.6.2",
"jsdom-global": "^3.0.2",
"mocha": "^5.0.1",

@@ -49,0 +51,0 @@ "rollup": "^0.56.3",

@@ -105,6 +105,8 @@ import React, { Component } from 'react';

const isStoreValid = validateStore(this.getSelectedState());
const selectedState = this.getSelectedState();
const isStoreValid = validateStore(selectedState);
this.setState({
valid: isStoreValid,
data: selectedState,
});

@@ -119,2 +121,6 @@

if (!Alt.displayName) {
Alt.displayName = 'AltComponent';
}
if (!Alt || valid) {

@@ -147,3 +153,2 @@ return (

altComponent: PropTypes.oneOfType([
PropTypes.node,
PropTypes.func,

@@ -158,3 +163,10 @@ ]),

R2D2.displayName =
`R2D2(${
WrappedComponent.displayName
|| WrappedComponent.name
|| 'Component'
})`;
return R2D2;
}