March 20, 2025 (4mo ago)
Definitely news to me. I have been using useEffect((),[variableToWatch])
to trigger filtering built-in commands such as the array commands
.filter() .map() .some() .every() .reduce() .find() .findIndex() .flatMap()
It turns out, it is unnecessary. Any method that creates a new array or processes an array will be recalculated on every render.
Update
Okay that did not age well. HAHA So apparently, if you do not use useEffect it updates for every rerender. This means it is so laggy. It will probably be able to handle 10-20 entries but 100+ more. I can feel it chugging.
So back to the good old reliable useEffect update.