Correct way to push into state array
Correct way to push into state array
As someone who has worked with React, I can say that pushing into state arrays can be a bit tricky. However, there are ways to ensure that the process is done correctly.
Method 1: Using the Spread Operator
The easiest and most recommended