Common Error: Accidentally Mutating State in React
In React, the state is immutable. In simple terms it means that you should not modify it directly. Instead a new object should be created to set the state using setState. Here are two examples. Modifying the state directly - Not Acceptable onChange(e...
Jun 12, 20212 min read219


