🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

redux-loading

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-loading

Loading control with Redux

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
11
-47.62%
Maintainers
1
Weekly downloads
 
Created
Source

redux-loading

Loading control with Redux

travis build Coveralls branch version MIT License

Example

import {createStore, combineReducers, applyMiddleware} from 'redux'
import {loadingReducer, loadingMiddleware} from 'redux-loading'

const store = createStore(
  combineReducers({
    loading: loadingReducer
  }), 
  applyMiddleware(loadingMiddleware)
)

let action = {
  type: 'SOME_ACTION',
  meta: {
    loading: true
  }
}

store.dispatch(action)

let state = store.getState()
//state = {loading: {pending: 1, done: false}}

action = {
  type: 'SOME_OTHER_ACTION',
  meta: {
    loading: false
  }
}

store.dispatch(action)

state = store.getState()
//state = {loading: {pending: 0, done: true}}

Keywords

redux

FAQs

Package last updated on 31 Mar 2016

Did you know?

Socket

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