News for hackers. Stuff that matters.
Re:React is becoming a black box by SirHound on Thursday September 03, 2020 @12:25PM (#24365658)
> There is the dependencies array, how it only does a strict equals check (no shallow comparison), how you need to memoize other dependencies so they don't change on every render

So basic memoisation?

> why you can't put one hook inside the other

Hooks inside other functions may be called at any time, how is React to know which component is calling them?

Re:React is becoming a black box by ricardobeat on Thursday September 03, 2020 @06:17PM (#24369521)
> So basic memoisation?

No. Before you just had to worry about shouldComponentUpdate and data received from the 'outside'. With hooks you need to memoize arguments to every function you call within the component - you didn't have to memoize class methods. The concerns and patterns involved are very different.