Socket
Socket
Sign inDemoInstall

react-redux-alerts

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.7 to 1.3.8

2

package.json
{
"name": "react-redux-alerts",
"version": "1.3.7",
"version": "1.3.8",
"description": "A lightweight library for creating keyed alerts in a Redux app",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -0,0 +0,0 @@ import * as alertConstants from './constants';

@@ -25,13 +25,7 @@ import React, { Component } from 'react';

function mapStateToProps (state) {
return { isVisible: state.alerts ? state.alerts[alertName] : false };
};
function mapDispatchToProps (dispatch) {
return { actions: bindActionCreators(alertActions, dispatch) };
};
const mapStateToProps = state => { isVisible: state.alerts[alertName] };
const mapDispatchToProps = dispatch => { actions: bindActionCreators(alertActions, dispatch) };
return connect(mapStateToProps, mapDispatchToProps)(AlertContainer);
};
export default createAlert;

@@ -0,0 +0,0 @@ export const INITIALIZE_ALERT = 'redux-alerts/INITIALIZE_ALERT';

import actions from './actions';
import alertReducer from './reducer';
import constants from './constants';
import createAlert from './alertContainer';
import createAlert from '/alertContainer';

@@ -6,0 +6,0 @@ export default {

@@ -22,3 +22,2 @@ import * as alertTypes from './constants';

const {type, alertName } = action;
if (state === undefined) return state;
if (type === alertTypes.INITIALIZE_ALERT) {

@@ -37,4 +36,3 @@ return {

}
if (state[alertName] === undefined) return state;
if (type === alertTypes.DESTROY_ALERT) {

@@ -47,2 +45,3 @@ return Object.keys(state).reduce((acc, alert) => {

}
if (state[alertName] === undefined) return state;
return Object.assign({}, state, {

@@ -49,0 +48,0 @@ [alertName]: reducer(state[alertName], action)

@@ -0,0 +0,0 @@ import * as types from '../src/constants';

@@ -0,0 +0,0 @@ import reducer from '../src/reducer';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc