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.4.0
to
0.4.1
+1
-1
package.json
{
"name": "react-r2d2",
"version": "0.4.0",
"version": "0.4.1",
"description": "HOC for dispatching an action automatically on component render",

@@ -5,0 +5,0 @@ "keywords": ["react", "higher", "order", "component", "redux", "dispatch", "store"],

@@ -63,2 +63,3 @@ <img src="https://i.imgur.com/LXTmHwZ.jpg" width="200px">

import React, { Component } from 'react';
import WrappedComponent from './Component';

@@ -69,7 +70,8 @@

// If the store is not able to be validated, this component will be rendered as altComponent.
const Loading = () => <div>Loading...</div>;
class Container extends Component {
// If the store is not able to be validated, this component will be rendered as altComponent.
loadingComponent = () => <div>Loading...</div>;
state = {}
render() {

@@ -82,3 +84,3 @@ return (

{/* v Optional v */}
altComponent={this.loadingComponent}
altComponent={Loading}
validateStore={state => state.id !== undefined}

@@ -85,0 +87,0 @@ />