The function will receive the previous value, and return an updated value. Here's an example of a counter component that uses both forms of setState :.
確定! 回上一頁