How to setState by value in React?
There is no way to further minify the code with the current ECMAScript version. Perhaps with ES6 it is possible, depending on what features the language has.
However, if you are worried about code redundancy, you can add this method to mixing and pass it across all the components you need.
Update: Thanks to @FakeRainBrigand for providing ES6 syntax that allows you to shrink your code:
source to share