SharePoint Framework (SPFx) developers often face the challenge of determining how to share code or refactor it from their projects in order to make it available for multiple projects. The objective is to avoid duplicating code, which is a common issue in development.
I’ve never used or found a need for SPFx library components. There's simply no need for a SPFx-specific solution to a problem that has already been solved with NPM packages.
In this episode, I’ll look at two options for externalizing your code to share across multiple projects and compare the advantages and disadvantages of each. Then, I’ll offer my thoughts and opinions on which of the two options I prefer and why.
But first, let’s look at the challenge and some of the unique aspects related to SPFx solutions.
🔗 Resources:
-------------------------------------------
🔗 Read the associated article - https://www.voitanos.io/blog/use-npm-...
🔗 "Sharing code: libraries & NPM packages" - preview from the "Mastering the SPFx" course - • "Sharing code: libraries & NPM packages" -...
📚 Chapters
-------------------------------------------
00:00 : Introduction
02:42 : SPFx Library Components
05:37 : NPM Packages
08:47 : Using NPM packages in SPFx Solutions
🔖 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
On this page of the site you can watch the video online Sharing Code in SharePoint Framework (SPFx) Projects: NPM vs. Library Components with a duration of hours minute second in good quality, which was uploaded by the user Andrew Connell 25 January 2024, share the link with friends and acquaintances, this video has already been watched 874 times on youtube and it was liked by 30 viewers. Enjoy your viewing!