Socket
Socket
Sign inDemoInstall

redux-landing

Package Overview
Dependencies
6
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    redux-landing

Initialize redux state asynchronously with multiple async actions.


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

Readme

Source

Initialize redux state asynchronously with multiple async actions.

Install

npm install --save redux-landing

Usage

import { createStore, applyMiddleware } from "redux";
import landing from "redux-landing";
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 asyncDispatch = landing(rootReducers, ...middlewares);
asyncDispatch(...initActions).then((preloadedState) => {
    const enhancer = applyMiddleware(...middlewares);
    const store = createStore(rootReducers, preloadedState, enhancer);
});

Keywords

FAQs

Last updated on 17 Jun 2017

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