News for hackers. Stuff that matters.
Re:Metaphysics and JavaScript by Tade0 on Thursday September 05, 2019 @07:47AM (#20885727)
useCallback used as something else than a provider of callback functions, e.g. for rendering.

Example:

  const renderItem = useCallback(() => <Item />, []);
And then:

  return renderItem();
What should have been used here is useMemo.

There are no comments on this comment yet.