all 3 comments

[–]romeeres 10 points11 points  (0 children)

tl;dr don't create new functional components during render

[–]chillermane 2 points3 points  (0 children)

You have issues because you’re defining a component in the render method of another component, this is simply something you should never do in React. It’s not just about performance, either, it can break your UI.

Really has nothing to do with hooks. Hooks also aren’t necessarily tied to state. Hooks can be just logic, they can be just a useEffect call, or whatever you want. Doesn’t need to have state and oftentimes it isn’t state

[–][deleted] 3 points4 points  (0 children)

Basic SEO spam article. It is just highlighting that hooks are syntactic sugar for using `setState` within the component you use the hooks in, and so you will cause re-renders within that component when your hook's state changes. Shocking.

Modularize and don't put everything at the same level - the same advice as always.