Post

But even if it tells you to use it, did you never have to add a prop to the dependency array? The linter is totally fine with that, but the memoization rarely works if that prop isn't a primitive...

Yeah that's a bit of a non-trivial situating. Adding props to dependency arrays is adding component coupling. IMO it breaks encapsulation, and to me is a bit of a smell that warrants extra attention. Not to say that it's wrong, just not trivial. no such thing as a free lunch, and all that

0 reposts1 like