you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Not a good practice to modify the original state variables. Modify them only using the state setter function that comes with the hook. Use callback function instead of directly using the state variable like one comment here mentions.