Skip to content

Commit 883a002

Browse files
committed
Formatting changes
1 parent b6c8d3b commit 883a002

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/spfx/web-parts/guidance/intercepting-query-changes-in-webparts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ localization_priority: Normal
99

1010
# Intercepting Query String Changes in Web Parts
1111

12-
When building a web part that needs to take into account query string changes you can use the web API `window.___location.search` to read the query string. However if the user proceeds to click a link on the page that contains the same path as the current URL and only the query string changes, the URL in the address bar will be updated but the page will not re-render (due to performance reasons). This document is aimed at showing how you can take advantage of other web APIs to track query string changes and respond to them in your web part.
12+
When building a web part that needs to take into account query string changes, you can use the web API `window.___location.search` to read the query string. However if the user proceeds to click a link on the page that contains the same path as the current URL and only the query string changes, the URL in the address bar will be updated but the page will not re-render (due to performance reasons). This document is aimed at showing how you can take advantage of other web APIs to track query string changes and respond to them in your web part.
1313

14-
First let's assume you have a basic webpart class that renders the current query string.
14+
First let's assume you have a basic web part class that renders the current query string.
1515

1616
```typescript
1717
export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorldWebPartProps> {
@@ -54,6 +54,6 @@ export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorld
5454
```
5555

5656
There are two parts to what we are doing in onInit:
57-
1. Ensuring that whenever ___pushState is called by other javascript we trigger our `_onUrlChange` method.
58-
2. Ensuring that whenever the browser fires a 'popstate' event (e.g. user pressing the browser back button) we trigger our `_onUrlChange` method.
5957

58+
1. Ensuring that whenever ___pushState is called by other javascript we trigger our `_onUrlChange` method.
59+
1. Ensuring that whenever the browser fires a 'popstate' event (for example, user pressing the browser back button) we trigger our `_onUrlChange` method.

docs/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
href: spfx/hyperlinking.md
142142
- name: Building Office add-ins
143143
href: spfx/office-addins-create.md
144-
- name: Intercepting query string changes in web parts
144+
- name: Intercepting query string changes
145145
href: spfx/web-parts/guidance/intercepting-query-changes-in-webparts.md
146146
- name: External libraries
147147
items:

0 commit comments

Comments
 (0)