Skip to content

Commit 1b7ab20

Browse files
authored
Adding notes on avoiding usage of JSOM
1 parent 804ab9b commit 1b7ab20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/spfx/web-parts/guidance/connect-to-sharepoint-using-jsom.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
22
title: Connect to SharePoint using the JavaScript Object Model (JSOM)
33
description: How to use SharePoint JSOM when building solutions on the SharePoint Framework.
4-
ms.date: 02/14/2022
4+
ms.date: 19/12/2022
55
ms.localizationpriority: high
66
---
77

88
# Connect to SharePoint using the JavaScript Object Model (JSOM)
99

10+
> [!IMPORTANT]
11+
> JSOM is considered as a legacy option to operate the data in the SharePoint Online. You should be looking into using the SharePoint REST API or Microsoft Graph APIs either directly or through the [Microsoft Graph SDKs](https://learn.microsoft.com/en-us/graph/sdks/sdk-installation) or with the [PnPjs JavaScript Library](https://github.com/pnp/pnpjs).
12+
13+
1014
When building SharePoint customizations, you might have used the SharePoint [JavaScript Object Model (JSOM)](../../../sp-add-ins/complete-basic-operations-using-javascript-library-code-in-sharepoint.md) to communicate with SharePoint. This is no longer the recommended path (see [Considerations](#considerations) later in this article). However, there are still valid use cases for using the JSOM API such as code migration.
1115

1216
To use SharePoint JSOM in your SharePoint Framework component, you must include it in your project. This wasn't previously required because it was already available on SharePoint pages for you to use. In the SharePoint Framework, you must explicitly load it into your component.

0 commit comments

Comments
 (0)