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): acad.link/reactjs
🖥️ Official Website & Courses
academind.com/courses/
💬 Academind Community
academind.com/community
👋 Social Media
twitter.com/maxedapps
twitter.com/academind_real
www.instagram.com/academind_real/
www.facebook.com/academindchannel/
www.linkedin.com/in/maximilian-schwarzmueller/
www.linkedin.com/in/manuel-lorenz-808b5185/
www.linkedin.com/company/academind-gmbh
www.linkedin.com/school/academind-pro
www.tiktok.com/@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 - Conclus
コメント