Conversation

I like setState because it lets you encapsulate state machine as implementation detail. I'd improve it's API to be more functional though.
3
5
42
The existing callback form of setState, does move React closer to functional not because uses fns, but because removes reliance on ordering.
2
3
20
for that reason I think code that uses callback form would be easier to rearrange into a more functional version of setState.
1
3