JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q51018F
  • License MIT

Faster and nicer reducers for your Redux applications. Say "NO!" to switch statements!

Package Exports

  • redux-blower

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-blower) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status Code Climate Test Coverage Issue Count Dependency Status NPM Dowloads NPM Version GitHub issues GitHub stars GitHub license

redux-blower

redux-blower is a tiny library that helps you to improve the readability and the performance of your Redux applications.

Motivation

Less code/better performance

Performance

Reducer implemented with redux-blower is currently ~30% faster than regular switch statements reducer (try it on your own).

How Does It Work?

import { createReducer } from 'redux-blower';

const counterReducer = createReducer({
  initialState: 0,

  listenTo: {
    ['counter:INCREMENT'](state, action) {
      return state + action.payload;
    },

    ['counter:DECREMENT']() {
      return this.state - this.action.payload;
    }
  }
});

counterReducer(0, { type: 'counter:INCREMENT', payload: 2 }); // => 2
counterReducer(5, { type: 'counter:DECREMENT', payload: 5 }); // => 0

Installation

npm install redux-blower

License

The MIT License (MIT) - See file 'LICENSE' in this project

Copyright © 2016 Jiri Chara. All Rights Reserved.