sp-dev-fx-webparts/samples/react-async-await-sp-pnp-js
dependabot[bot] bc37ea0be9 Bump decode-uri-component in /samples/react-async-await-sp-pnp-js
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-30 23:33:29 -05:00
..
.devcontainer Added SPFx 1.10 containers 2022-02-15 00:50:11 -05:00
assets Changed docs links to learn 2022-10-24 09:42:45 -04: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 Changed docs links to learn 2022-10-24 09:42:45 -04:00
gulpfile.js Update react-async-await-sp-pnp-js 2022-01-13 22:28:40 +00:00
package-lock.json Bump decode-uri-component in /samples/react-async-await-sp-pnp-js 2022-12-30 23:33:29 -05: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.