redux-perf-middleware
Measure the time that the actions need to change the state
Install
Usage
; const createStoreWithMiddleware = createStore;const store = ;
This project adheres to Semantic Versioning.
Example
Dumb Reducer
{ let sum; forlet i = 0; i< 10000; i++ forlet j = 0; j< 10000; j++ sum = i+j; return sum;} const Elements = { };
Dumb Component
; ; /** * Renders the markup for the topbar */ { const dispatch = thisprops; return <input onKeyDown= /> ; }; const selector = { return elements;} selector Input ;
On every keydown Redux will dispatch the action with type SLOW, and in the console the middleware will log something like:
Or check the sample app
Contributing
Feel free to open issues, make suggestions or send PRs. This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.
Contact
Twitter: @avraamakis
License
MIT