Redux Flush
Redux middleware for flushing frequent actions. It optimizes the redux based application via reducing re-rendering caused of changed state.
Installation
$ npm i -S redux-flush
Demo
$ npm run dev
# and visit localhost:7777
Usage
⚠ Caution
Basically, The action with meta.flush = true
will have array-like payload.
So, when you write reducers, please be CAREFUL.
If you want to pass just action payload, you can add omitKey
. And it MUST be array.
Example
Example with codes
;;;// or// import createFlush from 'redux-flush'; const reducers = ; const isProduction = processenvNODE_ENV === 'production'; const flushMiddleware = ;const middleware = ;const composeEnhancers = !isProduction ? global__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || composeWithDevTools : compose;const store = ; store; let num = 0; document;