|
|
|
|
|
by antihero
1691 days ago
|
|
> you could make a mistake in the dependencies array, This is an auto-fix with eslint, and when it isn't exactly right (you need a "one way update") you can override that rule. I would posit that passing a value that is regenerated every render (as opposed to when it actually changes) outside of the component (via props or context) is much more dangerous and likely to create infinite loops. For stuff that stays internal, sure, knock yourself out (until it is required by a useEffect or anything else that needs dependencies). |
|