You might not need useState()!
YouTube Viewers YouTube Viewers
910K subscribers
36,439 views
0

 Published On Jan 31, 2024

The useState() Hooks is a crucial React Hook. But it's sometimes being used in situations where you actually don't need - and where you therefore shouldn't use it.
Because there are UX or performance benefits to be reaped when avoiding it in certain scenarios.

Learn all about React (discount applied): https://acad.link/reactjs

🖥️ Official Website & Courses
https://academind.com/courses/

💬 Academind Community
https://academind.com/community

👋 Social Media
  / maxedapps  
  / academind_real  
  / academind_real  
  / academindchannel  
  / maximilian-schwarzmueller  
  / manuel-lorenz-808b5185  
  / academind-gmbh  
  / academind-pro  
  / academind_real  

00:00:00 - Introduction
00:00:33 - useState() Recap
00:01:27 - Using useRef() instead of useState()
00:03:12 - Alternative: Leveraging Built-in Browser Features
00:04:13 - React Deep Dive
00:04:57 - Alternatives: Store Information in URL (Query Params)
00:07:02 - Improvement: Sync State with localStorage
00:08:08 - Conclusion

show more

Share/Embed