DEV Community

Discussion on: You don't know useEffect

Collapse
 
apaatsio profile image
Antti Ahti

Nice article, thanks. There are a couple of errors in the first code snippet under section 2b, though.

  1. It's missing import for useEffect
  2. It should use object destructuring in the List component, i.e. const List = memo(({ list }) => ... (note the curly braces around list)
  3. fakeList should be an array fakeList = [...] and not a function fakeList = () => [...]