Re:Things every React.js beginner should know
by Retozi on Monday January 25, 2016 @04:35PM
(#10970100)
you can use the functional way of setState by passing a transaction function (state: State) => State . This allows for typed, immutable updates since the function gets passed a copy of the state.
If you need an object (say to use it in something like Redux), you have to write a wrapper like so: https://gist.github.com/ebi/d186c4297c84d562aeae