Рет қаралды 6,348
I scour all the Microsoft & community resources so YOU DON'T HAVE TO. Save time & stay informed. Each issue contains all the news you need in less than 5 minutes every other Tuesday plus my insights & guidance on a trending topic. Subscribe to my bi-weekly newsletter & join 9,000+ fellow M365 developers! vtns.io/ytvnewsletter! No clickbait · 100% free · unsubscribe anytime.
-------------------------------------------
The current version of the Yeoman generator for the #SharePoint Framework (#SPFx) still uses the older-style #React class components. Because that's what you get by default, that's what most developers end up using.
But functional components enabled by React hooks have become widely popular… and I get a lot of questions on how to use React hooks in your #SharePoint projects!
So… until Microsoft updates the Yeoman generator, I'm going to show you how you change your new projects to React hooks in just a few minutes.
And then, I'll show you the basics of hooks with a simple example.
🔗 Read the article ▶️ vtns.io/ytvreacthooksspfx
📚 Chapters
-------------------------------------------
00:00 : Introduction
01:00 : What's the problem?
02:08 : Convert a class component to a functional component
03:37 : Implement state & refresh the web part
05:07 : Add button & event handler
07:33 : Add event handler when state property changes
10:21 : Initialize the component with useEffect()
🤓 LEARN MICROSOFT 365 FULL-STACK DEVELOPMENT WITH AC! 👇👇👇
MY FREE MICROSOFT 365 EMAIL & SELF-PACED COURSES
-------------------------------------------
📺 Mastering the SharePoint Framework (Starter Bundle) vtns.io/ytvcoursemspfx
✉️ Explore & evaluate the SharePoint Framework vtns.io/ytvecourseexplorespfx
✉️ Understand the SharePoint Framework toolchain vtns.io/ytvecoursespfxtoolchain
✉️ Microsoft Teams App Development OnRamp vtns.io/ytvecoursemsteamsonramp
MY SELF-PACED COURSES
-------------------------------------------
📺 Build Web Parts with the SharePoint Framework (SPFx) vtns.io/ytvcoursespfxwp
📺 Extend the SharePoint UX with the SharePoint Framework (SPFx) Extensions vtns.io/ytvcoursespfxext
📺 Extend Viva Connections with the SharePoint Framework Adaptive Card Extensions vtns.io/ytvcoursespfxace
🔗 RESOURCES
-------------------------------------------
🔗 Want more SPFx? 👉 • START HERE 👉 SharePoin...
🔗 Want more Microsoft Teams app dev? 👉 • START HERE 👉 Microsoft...
🔗 Want more Microsoft 365 app dev? 👉 • START HERE 👉 Microsoft...
🔗 LINKS
-------------------------------------------
Subscribe to "The Full Stack Dev's Microsoft 365 Playbook" ✉️ vtns.io/ytvnewsletter - latest Microsoft 365 news & insights for developers
LinkedIn ▶️ / andrewconnell
Threads ▶️ www.threads.net/@andrewconnell1
GitHub ▶️ github.com/andrewconnell & github.com/voitanos
𝕏 | Twitter ▶️ / andrewconnell
www.andrewconnell.com/links/
Website ▶️ www.voitanos.io/