Socket
Socket
Sign inDemoInstall

react-redux-toastr

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-redux-toastr - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

src/less/react-redux-toastr.less

12

package.json
{
"name": "react-redux-toastr",
"version": "2.0.0",
"description": "redux-toastr is a React toastr message implemented with Redux",
"version": "2.0.1",
"description": "react-redux-toastr is a React toastr message implemented with Redux",
"main": "lib/index.js",

@@ -18,3 +18,3 @@ "jsnext:main": "./src/index.js",

"build:umd:min": {
"command": "./node_modules/.bin/webpack src/index.js dist/redux-toastr.min.js --config build/webpack.config.js",
"command": "./node_modules/.bin/webpack src/index.js dist/react-redux-toastr.min.js --config build/webpack.config.js",
"env": {

@@ -31,6 +31,6 @@ "NODE_ENV": "production"

"less_file": {
"command": "node_modules/.bin/lessc src/less/redux-toastr.less --autoprefix=\"last 2 versions\" lib/css/redux-toastr.css"
"command": "node_modules/.bin/lessc src/less/react-redux-toastr.less --autoprefix=\"last 2 versions\" lib/css/react-redux-toastr.css"
},
"less_file:min": {
"command": "node_modules/.bin/lessc src/less/redux-toastr.less --autoprefix=\"last 2 versions\" --clean-css lib/css/redux-toastr.min.css"
"command": "node_modules/.bin/lessc src/less/react-redux-toastr.less --autoprefix=\"last 2 versions\" --clean-css lib/css/react-redux-toastr.min.css"
},

@@ -69,3 +69,3 @@ "lint": {

"redux toastr",
"redux-toastr",
"react-redux-toastr",
"react-component",

@@ -72,0 +72,0 @@ "toastr",

@@ -1,4 +0,4 @@

##`redux-toastr` [demo](http://diegoddox.github.io/redux-toastr/)
##`react-redux-toastr` [demo](http://diegoddox.github.io/react-redux-toastr/)
`redux-toastr` is a React toastr message implemented with [Redux](https://github.com/rackt/redux), primary consists of three things: a reducer, toastr emitter and a React component.
`react-redux-toastr` is a React toastr message implemented with [Redux](https://github.com/rackt/redux), primary consists of three things: a reducer, toastr emitter and a React component.

@@ -11,14 +11,14 @@ The reducer listens to dispatched actions from the component to maintain the `toastr` state in Redux.

`npm install --save redux-toastr`
`npm install --save react-redux-toastr`
##### 2. Add the `redux-toastr` css link to your app
##### 2. Add the `react-redux-toastr` css link to your app
##### NOTE: This can be change at anytime
```
<link href="http://diegoddox.github.io/redux-toastr/2.0.0/redux-toastr.min.css" rel="stylesheet" type="text/css">
<link href="http://diegoddox.github.io/react-redux-toastr/2.0.1/react-redux-toastr.min.css" rel="stylesheet" type="text/css">
```
##### 3. The third thing you need to do is to add the `redux-toastr` `reducer` to Redux.
##### 3. The third thing you need to do is to add the `react-redux-toastr` `reducer` to Redux.
```
import {createStore, combineReducers} from 'redux'
import {reducer as toastrReducer} from 'redux-toastr'
import {reducer as toastrReducer} from 'react-redux-toastr'
const reducers = {

@@ -32,8 +32,8 @@ // ... other reducers ...

##### NOTE: The default mount point for `redux-toastr` is `toastr`.
##### NOTE: The default mount point for `react-redux-toastr` is `toastr`.
##### 4. Add the `redux-toastr` React component to the root of your app
##### 4. Add the `react-redux-toastr` React component to the root of your app
```
import {Provider} from 'react-redux'
import ReduxToastr from 'redux-toastr'
import ReduxToastr from 'react-redux-toastr'

@@ -59,3 +59,3 @@ <Provider store={store}>

##### 5. Add the `redux-toastr` `toastr` emitter
##### 5. Add the `react-redux-toastr` `toastr` emitter
The `toastr` method use [eventemitter3](https://github.com/primus/eventemitter3) to dispatch the actions

@@ -65,3 +65,3 @@

import React, {Component} from 'react'
import {toastr} from 'redux-toastr'
import {toastr} from 'react-redux-toastr'

@@ -83,7 +83,7 @@ export class YourComponent extends Component {

import {bindActionCreators} from 'redux'
import {actions as toastrActions} from 'redux-toastr'
import {actions as toastrActions} from 'react-redux-toastr'
// In your React component
constructor(props) {
super(props);
// Bind the redux-toastr actions to the component
// Bind the react-redux-toastr actions to the component
this.toastr = bindActionCreators(toastrActions, this.props.dispatch)

@@ -98,3 +98,3 @@ }

```
import {toastr} from 'redux-toastr'
import {toastr} from 'react-redux-toastr'

@@ -152,4 +152,4 @@ const toastrOptions = {

```
git clone https://github.com/diegoddox/redux-toastr.git
cd redux-toastr/demo/
git clone https://github.com/diegoddox/react-redux-toastr.git
cd react-redux-toastr/demo/
npm install

@@ -156,0 +156,0 @@ npm start

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