It depends on the scenario, the main purpose of using Memoization here is to prevent unnecessary re-render (i.e the List only cares about fakeList, but it's re-rendered just because of changes of other stuff). Actually in real-life project, determining whether to use Memoization or not is much more complex than that.
Hey there, It was amazing. I am having a little doubt.
Is it worth it to memoize the component who has useEffect hook?
Every time some dependencies is going to be changed, the callback function will trigger! So what's meaning of memoization here!
It depends on the scenario, the main purpose of using Memoization here is to prevent unnecessary re-render (i.e the List only cares about fakeList, but it's re-rendered just because of changes of other stuff). Actually in real-life project, determining whether to use Memoization or not is much more complex than that.
That's great.