• Stars
    star
    213
  • Rank 185,410 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

More Repositories

1

mongoose-deep-populate

Mongoose plugin to enable deep population of nested models ⛺
JavaScript
469
star
2

topbar

Tiny & beautiful site-wide progress indicator
CSS
436
star
3

fasterflect

.NET Reflection Made Fast and Simple ⛺
C#
283
star
4

combres

ASP.NET and MVC performance optimization library ⛺
C#
123
star
5

route-decorators

ES7 decorators that simplify Koa and Express route creation
JavaScript
75
star
6

esql

Humane query language for Elasticsearch ⛺
JavaScript
50
star
7

memento

Lightweight and extensible undo framework for .NET ⛺
C#
33
star
8

bike

Cross-platform, CLR-based programming language
C#
29
star
9

exif-orient

Library to orient images based on their Exif orientation ⛺
JavaScript
21
star
10

koa-req-validator

Declarative request validation middleware for Koa
JavaScript
19
star
11

redux-validate-fsa

Redux middleware that validates if an action is a Flux Standard Action (FSA).
JavaScript
16
star
12

notify

Change tracking library for .NET ⛺
C#
13
star
13

jundo

JavaScript Undo Library ⛺
JavaScript
11
star
14

jcr

jQuery Carousel ⛺
HTML
7
star
15

cordova-photo-library

Cordova plugin to save images and videos to photo library ⛺
Objective-C
5
star
16

misc-js

Miscellaneous JavaScript
JavaScript
4
star
17

local-server

Minimal static server
JavaScript
3
star
18

spotify-importer

Import local music library to Spotify
JavaScript
3
star
19

evtify

Event emitter for Node & browser ⛺
JavaScript
2
star
20

grunt-mindirect

Grunt task to perform in-place JS minification
JavaScript
1
star
21

metronome

Simple metronome
HTML
1
star
22

qtrace-samples

Sample code for qTrace publishers
C#
1
star