Most React developers use React Hooks to create React apps, as evidenced by documentation, examples, and videos on YouTube. However, this is not the case in the Microsoft 365 development space, where SharePoint Framework (SPFx) developers still primarily use class components. This is likely due to new SPFx projects defaulting to class components, which have been one of the last holdouts.
Even new Microsoft Teams projects created with YO Teams in the Visual Studio Teams Toolkit use Hooks. Although I was late to switch over to Hooks, I quickly saw why so many others had made the switch. If you haven't made the switch yet, this is for you.
In this video, I explain why functional components enabled by Hooks are better than class components, and why I prefer Hooks even more. For SPFx developers, I also show you how to quickly convert your new SPFx web part projects to React Hooks.
🔗 Resources:
-------------------------------------------
🔗 Read the associated article - https://www.voitanos.io/blog/react-ho...
🔗 CloudDev Clarity (ep9) | React Hooks: Class vs. Functional Components & When & Where to Use Them? - • React Hooks: Class vs. Functional Componen...
🔗 Using React Hooks in the SharePoint Framework: A Step-by-Step Guide - • Using React Hooks in the SharePoint Framew...
📚 Chapters
-------------------------------------------
00:00 : Introduction
03:43 : Why do we need React Hooks?
04:27 : So how do React Hooks work?
04:54 : Hooks - useMemo()
06:03 : Hooks - useState()
06:43 : Hooks - useEffect()
07:26 : Hooks - useCallback()
08:31 : Using React Hooks in Microsoft 365 Projects
🔖 My on-demand & free email courses
-------------------------------------------
📺 Mastering the SharePoint Framework
https://www.voitanos.io/course-master...
📺 Build Web Parts with the SharePoint Framework (SPFx)
https://www.voitanos.io/course-sharep...
📺 Extend the SharePoint UX with the SharePoint Framework (SPFx) Extensions
https://www.voitanos.io/course-sharep...
📺 Extend Viva Connections with the SharePoint Framework Adaptive Card Extensions
https://www.voitanos.io/course-sharep...
✉️ Explore & evaluate the SharePoint Framework
https://www.voitanos.io/ecourse-explo...
✉️ Understand the SharePoint Framework toolchain
https://www.voitanos.io/ecourse-under...
🔗 Links
-------------------------------------------
Newsletter ✉️ https://www.voitanos.io/newsletter/
Website ▶️ https://www.voitanos.io/
Twiter ▶️ / andrewconnell
LinkedIn ▶️ / andrewconnell
Facebook ▶️ / voitanos
Instagram ▶️ / voitanos_llc