You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -133,15 +133,15 @@ SharePoint Framework includes a helper class `spHttpClient` to execute REST API
133
133
134
134
## Addnewstyles
135
135
136
-
TheSharePointFrameworkuses [Sass](http://sass-lang.com/) as the CSS pre-processor, and specifically uses the [SCSS syntax](http://sass-lang.com/documentation/file.SCSS_FOR_SASS_USERS.html), which is fully compliant with normal CSS syntax. Sass extends the CSS language and allows you to use features such as variables, nested rules, and inline imports to organize and create efficient style sheets for your web parts. The SharePoint Framework already comes with a SCSS compiler that converts your Sass files to normal CSS files, and also provides a typed version to use during development.
136
+
TheSharePointFrameworkuses [Sass](http://sass-lang.com/) as the CSS pre-processor, and specifically uses the [SCSS syntax](http://sass-lang.com/documentation/file.SCSS_FOR_SASS_USERS.html), which is fully compliant with normal CSS syntax. Sass extends the CSS language and allows you to use features such as variables, nested rules, and inline imports to organize and create efficient style sheets for your web parts. The SharePoint Framework already comes with an SCSS compiler that converts your Sass files to normal CSS files, and also provides a typed version to use during development.
137
137
138
138
### Toaddnewstyles
139
139
140
140
1. Open **HelloWorldWebPart.module.scss**. ThisistheSCSSfilewhereyoudefineyourstyles.
@@ -173,7 +173,7 @@ The SharePoint Framework uses [Sass](http://sass-lang.com/) as the CSS pre-proce
173
173
}
174
174
```
175
175
176
-
3. Save the file.
176
+
1. Save the file.
177
177
178
178
Gulp rebuilds the code in the console as soon as you save the file. This generates the corresponding typings in the **HelloWorldWebPart.module.scss.ts** file. After compiled to TypeScript, you can then import and reference these styles in your web part code.
179
179
@@ -214,20 +214,20 @@ Open the `HelloWorldWebPart` class.
214
214
215
215
This method references the new CSS styles added earlier by using the `styles` variable and is used to render list information that will be received from REST API.
216
216
217
-
2. Save the file.
218
-
3. Add the following private method inside the `HelloWorldWebPart` class to call the method to retrieve list data:
217
+
1. Save the file.
218
+
1. Add the following private method inside the `HelloWorldWebPart` class to call the method to retrieve list data:
219
219
220
220
```typescript
221
221
private _renderListAsync(): void {
222
222
this._getListData()
223
223
.then((response) => {
224
224
this._renderList(response.value);
225
-
});
225
+
})
226
+
.catch(() => {});
226
227
}
227
228
```
228
229
229
-
4. Save the file.
230
-
230
+
1. Save the file.
231
231
232
232
## Retrieve list data
233
233
@@ -269,4 +269,4 @@ Open the `HelloWorldWebPart` class.
269
269
270
270
Congratulations on connecting your web part to SharePoint list data!
271
271
272
-
You can continue building out your Hello World web part in the next topic [Deploy your web part to a SharePoint page](./serve-your-web-part-in-a-sharepoint-page.md). You'll learn how to deploy and preview the Hello World web part in a SharePoint page.
272
+
You can continue building out your Hello World web part in the next article [Deploy your web part to a SharePoint page](./serve-your-web-part-in-a-sharepoint-page.md). You'll learn how to deploy and preview the Hello World web part in a SharePoint page.
0 commit comments