Socket
Socket
Sign inDemoInstall

redux-blower

Package Overview
Dependencies
1
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    redux-blower

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


Version published
Maintainers
1
Install size
1.98 MB
Created

Readme

Source

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.

Keywords

FAQs

Last updated on 25 Apr 2016

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