Skip to content

Commit 99ef0bc

Browse files
committed
Update for SPFx v1.14
1 parent 6ceaa50 commit 99ef0bc

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

docs/spfx/extensions/get-started/build-a-hello-world-extension.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,9 @@ You can also follow the steps in this article by watching the video on the Share
3939
1. When prompted, enter the following values (*select the default option for all prompts omitted below*):
4040

4141
- **What is your solution name?**: app-extension
42-
- **Which baseline packages do you want to target for your component(s)?** SharePoint Online only (latest)
4342
- **Which type of client-side component to create?**: Extension
43+
- **Which type of client-side extension to create?**: Application Customizer
4444
- **What is your Application Customizer name?** HelloWorld
45-
- **What is your Application Customizer description?** HelloWorld description
4645

4746
> [!NOTE]
4847
> If you use a name for the extension that is too long, you might encounter issues. The entries provided are used to generate an alias entry for the Application Customizer manifest JSON file. If the alias is longer than 40 characters, you get an exception when you try to serve the extension by using **gulp serve --nobrowser**. You can resolve this by updating the alias entry afterward.
@@ -92,7 +91,6 @@ Open the **./src/extensions/helloWorld/HelloWorldApplicationCustomizer.ts** file
9291
Notice that base class for the Application Customizer is imported from the **\@microsoft/sp-application-base** package, which contains SharePoint framework code required by the Application Customizer.
9392

9493
```typescript
95-
import { override } from '@microsoft/decorators';
9694
import { Log } from '@microsoft/sp-core-library';
9795
import {
9896
BaseApplicationCustomizer
@@ -108,19 +106,18 @@ The logic for your Application Customizer is contained in the `onInit()` method,
108106
The following are the contents of `onInit()` in the default solution. This default solution writes a log to the Dev Dashboard, and then displays a simple JavaScript alert when the page renders.
109107

110108
```typescript
111-
@override
112-
public onInit(): Promise<void> {
113-
Log.info(LOG_SOURCE, `Initialized ${strings.Title}`);
109+
public onInit(): Promise<void> {
110+
Log.info(LOG_SOURCE, `Initialized ${strings.Title}`);
114111

115-
let message: string = this.properties.testMessage;
116-
if (!message) {
117-
message = '(No properties were provided.)';
118-
}
112+
let message: string = this.properties.testMessage;
113+
if (!message) {
114+
message = '(No properties were provided.)';
115+
}
119116

120-
Dialog.alert(`Hello from ${strings.Title}:\n\n${message}`);
117+
Dialog.alert(`Hello from ${strings.Title}:\n\n${message}`);
121118

122-
return Promise.resolve();
123-
}
119+
return Promise.resolve();
120+
}
124121
```
125122

126123
> [!NOTE]
@@ -130,7 +127,7 @@ If your Application Customizer uses the `ClientSideComponentProperties` JSON inp
130127

131128
## Debug your Application Customizer
132129

133-
You can't use the local Workbench to test SharePoint Framework Extensions. You need to test them against a live SharePoint Online site. However, you don't have to deploy your customization to the app catalog to test the solution, which makes the debugging experience simple and efficient.
130+
You can't use the SharePoint Workbench to test SharePoint Framework Extensions. You need to test them against a live SharePoint Online site. However, you don't have to deploy your customization to the app catalog to test the solution, which makes the debugging experience simple and efficient.
134131

135132
1. Open the **./config/serve.json** file.
136133

0 commit comments

Comments
 (0)