Need help with redux-freeze?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

buunguyen
211 Stars 19 Forks MIT License 17 Commits 2 Opened issues

Description

Redux middleware that prevents state from being mutated anywhere in the app

Services available

!
?

Need anything else?

Contributors list

# 554
CSS
Less
edge
Firefox
9 commits
# 232,054
JavaScr...
React
React N...
Objecti...
1 commit
# 485,007
CSS
JavaScr...
Shell
runloop
1 commit
# 46,399
HTML
CSS
React
reactjs
1 commit

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.7 * Fix bug state not frozen before the first dispatch

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

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.