sp-dev-fx-webparts/samples/react-async-await-sp-pnp-js
Hugo Bernier f40cdcdfd2
Added links to compatibility matrix
2022-10-17 10:21:52 -04:00
..
.devcontainer Added SPFx 1.10 containers 2022-02-15 00:50:11 -05:00
assets Removing unnecessary office product from the sample metadata 2021-12-10 19:55:32 +02:00
config Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
src Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
.gitattributes React sample showing the use of sp-pnp-js with Async functions and Logging enabled (#187) 2017-05-06 14:27:17 +03:00
.gitignore Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
.npmignore React sample showing the use of sp-pnp-js with Async functions and Logging enabled (#187) 2017-05-06 14:27:17 +03:00
.yo-rc.json Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
README.md Added links to compatibility matrix 2022-10-17 10:21:52 -04:00
gulpfile.js Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
package-lock.json Bump eventsource in /samples/react-async-await-sp-pnp-js 2022-06-02 04:05:23 +00:00
package.json Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
tsconfig.json Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
tslint.json Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
upgrade-report.md Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00

README.md

Compatibility

This sample is designed to be used in the following enviroments:

page_type: sample products:

  • office-sp languages:
  • javascript
  • typescript extensions: contentType: samples technologies:
    • SharePoint Framework platforms:
    • react createdDate: 5/1/2017 12:00:00 AM

Using @pnp/js with Async / Await

Summary

This web part demonstrates how to use PnPJS with Async functions into the SharePoint Framework.

React-sp-pnp-js-async-await

Compatibility

Compatibility

SPFx 1.4.1 Node.js v8 | v6 Compatible with SharePoint Online Incompatible with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Local Workbench Incompatible Hosted Workbench Compatible Compatible with Remote Containers

For more information about SPFx compatibility, please refer to https://aka.ms/spfx-matrix

Applies to

Solution

Solution Author(s)
react-async-await-sp-pnp-js Jose Quinto (@jquintozamora , blog.josequinto.com)
Version 2 refactored as purely a PnPjs sample by Julie Turner (@jfj1997)

Version history

Version Date Comments
2.0 Jan 13, 2022 Updated to SPFx 1.14 & PnPjs version 3 & removed logging sample.
1.2 Jul 20, 2018 Replaced deprecated sp-pnp-js with @pnp/js
1.1 Mar 6, 2018 Update to 1.4.1
1.0 May 1, 2017 Initial release

Minimal Path to Awesome

  1. clone this repo
  2. $ npm i
  3. Update online workbench url in the initialPage property of the config/serve.json file.
  4. $ gulp serve

This sample can also be opened with VS Code Remote Development. Visit https://aka.ms/spfx-devcontainer for further instructions.

Local Mode

A browser in local mode (localhost) will be opened. https://localhost:4321/temp/workbench.html

SharePoint Mode

If you want to try on a real environment, open: https://your-domain.sharepoint.com/_layouts/15/workbench.aspx

Usage

React-sp-pnp-js-async-await-code

Features

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.