Re:React's useState should require a dependency array
by PaulHoule on Friday May 30, 2025 @04:02PM
(#44139450)
I think in the cases where you'd want useState to have declared dependencies you don't want to use useState.
The people who started the system I work on now had the bad habit of copying prop variables into state variables for no good reason and over a period of time I've removed those state variables, pushed state up, and followed the mantra that "props are preferable to state".
The people who started the system I work on now had the bad habit of copying prop variables into state variables for no good reason and over a period of time I've removed those state variables, pushed state up, and followed the mantra that "props are preferable to state".