Week 7: React hooks and more!
dev.to·22h·
Discuss: DEV
Flag this post

This week was very light. I did not cover anything that was too new or too hard because I needed a break and also wanted to stay in touch! So let’s get right into it.

Topics Covered✅

  • React returns- the need to return just one parent component
  • Re-Renders and minimising them
  • Keys in React
  • Wrapper components and children
  • Hooks
  • React.memo

Let’s get into them in detail.

1. React Returns

If you notice that when we try to return sibling components out of a React component, React screams a huge NO. This is because React components must return a single root element. Returning multiple sibling elements isn’t allowed because each component needs one clear root in the virtual DOM tree. This structure enables React’s reconciliation process to work efficiently.

###…

Similar Posts

Loading similar posts...