Week 7: React hooks and more!
dev.to·13w·
Discuss: DEV

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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help