Socket
Socket
Sign inDemoInstall

redux-dispatch-monitor

Package Overview
Dependencies
6
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    redux-dispatch-monitor

Initialize redux state asynchronously with multiple async actions.


Version published
Weekly downloads
0
Maintainers
1
Install size
4.85 kB
Created
Weekly downloads
 

Readme

Source

Initialize redux state asynchronously with multiple async actions.

Install

npm install --save redux-dispatch-monitor

Usage

import { createStore, applyMiddleware, compose } from "redux";
import monitor from "redux-dispatch-monitor";
import thunk from "redux-thunk";
import customizedMiddleware from "./middlewares/customized";
import rootReducers from "./reducers";
import { action1, action2, actionN } from "./actions";

const middlewares = [thunk, customizedMiddleware];
const initActions = [
    action1(params),
    action2(params),
    actionN(params)
];

const enhancer = compose(monitor, applyMiddleware(...middlewares));
const store = createStore(rootReducers, enhancer);
monitor.dispatch(...initActions).done((preloadedState) => {
    // do some things initializing
})

Keywords

FAQs

Last updated on 25 Jan 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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