youtube image
From YouTube: PnPjs v3 – Using and adjusting PnPjs v3 config file in your SPFx solution

Description

In this 5-minute demo, Julie Turner and Patrick Rodgers show how to get started with #PnPjs v3.0. You created a centralized config file in the previous session, now initialize and import the _sp variable into your project. In a React web part, call getSP() function within a component with no parameters and get back the previously stored _sp instance located in your pnpjsConfig.ts file. In your web part set the local instance this.sp = getSP() inside your component. Reusing a centrally configured (global) variable across all your components is just simple and clean. This is part 3 of a 5-part series.

Demo Presenters
📽️ Julie Turner | @jfj1997
📽️ Patrick Rodgers | @mediocrebowler

Supporting materials
✔️ Library - PnP/PnPjs | https://pnp.github.io/pnpjs

Learn more
✔️ Microsoft 365 Unified Sample gallery - https://aka.ms/m365/samples
✔️ Microsoft 365 Platform Community in YouTube - https://aka.ms/m365/videos
✔️ Microsoft 365 Platform Community blog - https://pnp.github.io/blog
✔️ Microsoft 365 Platform Community - http://aka.ms/m365/community