Redux middleware that prevents state from being mutated anywhere in the app
JavaScript
Switch branches/tags
Clone or download
Latest commit 07cedea May 8, 2018
Permalink
Failed to load latest commit information.
src Refactor & release Oct 11, 2016
test Refactor & release Oct 11, 2016
.babelrc Initial commit Nov 24, 2015
.gitignore Adding TS definition file May 5, 2018
.npmignore Initial commit Nov 24, 2015
.travis.yml Initial commit Nov 24, 2015
LICENSE Initial commit Nov 24, 2015
README.md Refactor & release Oct 11, 2016
index.d.ts Adding TS definition file May 5, 2018
package.json Adding TS definition file May 5, 2018

README.md

redux-freeze

NPM

Build Status

Redux middleware that prevents state from being mutated anywhere in the app. When mutation occurs, an error will be thrown by the runtime. This is useful during development mode to ensure that no part of the app accidentally mutates the state.

Usage

// Only includes in DEV mode
if (__DEV__) {
  const freeze = require('redux-freeze')
  reduxMiddleware.push(freeze)
}

Test

npm install
npm test

Changes

0.1.5

  • Fix bug error is thrown when an object in the state has null prototype

0.1.4

  • Fix bug error is thrown when the state is not freezable

0.1.3

  • Fix bug result of the middleware is not returned