作者:罗帅飞1 | 来源:互联网 | 2023-10-15 19:39
In the second form of setState() that accepts a function, the first argument to the function is the previous state. In the code example though, it is called state which is counter intuitive to beginners. function(prevState, props) makes more sense IMHO.
I'm new by the way and don't know your rules and conventions. I apologize in advance if I should have proceeded differently.
该提问来源于开源项目:reactjs/reactjs.org
This hasn't turned out to be a problem in practice. Thank you for your PR!