5. Different way to reference the framework
based on its format
• Module format (AMD, UMD, etc.)
• URL only
• Non-module format
• URL + globalName
• optional globalDependencies
6.
7. Known where you’re running
• Get from this.context.environment.type
• Possible values:
• EnvironmentType.Test – tests context
• EnvironmentType.Local – SharePoint workbench
• EnvironmentType.SharePoint – Modern SharePoint page
• EnvironmentType.ClassicSharePoint – Classic SharePoint page
8. Validate web part properties values
• Synchronous
• Valid value: return empty string
• Invalid value: return error message
• Asynchronous (using Promises)
• Valid value: resolve promise with empty string
• Invalid value: resolve promise with the error message
• Do not reject the promise!
9. Pre-configure web part for easy use
• Configuration set provided through preconfiguredEntries
• Different title, description and web part properties value
10. Consider search
• Use the searchablePropertyNames property to expose web
part configuration to SharePoint search
11.
12. Web part configuration
• Standard through web part property pane
• Easy to implement
• Familiar to users
• Custom through the web part surface
• More complex to implement
• Gives developers more freedom
13.
14. Analyze SharePoint Framework projects with
SPCAF
• Catch errors and fix easily using the provided guidance
• For developers
• Code analysis
• Best practices
• For administrators
• Solution inventory
• Security assessment
• Available soon (visit spcaf.com for more information)