Creating SPAs with web parts
A SharePoint Framework web part can be displayed inside of a single app part page like an SPA. The web part controls the whole canvas. The app part page itself cannot be edited or configured. The web part’s settings and the name of the page can be changed in the Property pane. The page doesn’t have a header section like article pages or news pages do, so the header needs to be handled within the web part’s code.
The support for app part pages is enabled in the web part’s manifest by adding SharePointFullPage
to the supportedHosts
property. This is automatically set during project creation. The supportedHosts
property controls how the web part can be used in SharePoint and Microsoft Teams:
"supportedHosts": ["SharePointWebPart", "TeamsPersonalApp", "TeamsTab", "SharePointFullPage"]
After the property is set, the web part needs to be deployed before it can be used. The Workbench...