Skip to content

Measures the purity of your Redux implementation. The fewer uses of `setState`, the higher your purity!

Notifications You must be signed in to change notification settings

ptzagk/pure-redux

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

We all know Redux is the best, and that component internal state is for suckers.

This tool determines the number of mentions of setState you have in your repository divided by the total number JavaScript/TypeScript source code lines. The lower the ratio of setState mentions to the total number of lines in your repository, the higher your purity percentage. Ideally, you'll reach the holy grail of NO setState mentions, otherwise known as PURE REDUX.

P.S. Yes, I'm aware that even Dan Abramov himself advocates for the use of component internal state. Clearly he has not seen the light of purity inherent in his own creation! PURE REDUX FOREVER.

Usage:

npm install pure-redux -g

Navigate to your source directory and run pure-redux.

About

Measures the purity of your Redux implementation. The fewer uses of `setState`, the higher your purity!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%