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
1.[Rendering UI onto the page](#step-3-rendering-ui)
10
10
11
-
Each step provides multiple approaches to suit different development environments and requirements. These approaches can be mix and match to create a tailored solution for the scenario.
11
+
Each step provides multiple approaches to suit different development environments and requirements. These approaches can be mixed and matched to create a tailored solution for the scenario.
12
12
13
13
## Step 1: Importing code
14
14
15
-
There are 3 ways to import the code:
15
+
There are three ways to import the code:
16
16
17
17
- Pure HTML (bundler-less)
18
18
-[Import via `<script type="importmap">`](#esm-import-via-script-typeimportmap)
@@ -67,7 +67,7 @@ Copy and paste the following code snippet into your HTML page. It imports React
67
67
```
68
68
</details>
69
69
70
-
Using an import map alongside a smart CDN service (such as, [esm.sh](https://esm.sh/) or [esm.run](https://esm.run/)) allows leveraging modern JavaScript features like lazy-loading and HTTP pipelining, enhancing performance and efficiency.
70
+
Using an import map alongside a smart CDN service (such as, [esm.sh](https://esm.sh/) or [esm.run](https://esm.run/)) allows you to leverage modern JavaScript features like lazy-loading and HTTP pipelining, enhancing performance and efficiency.
71
71
72
72
#### Deploying Web Chat to a static web server or CDN
73
73
@@ -85,7 +85,7 @@ Serving Web Chat code from your own service is recommended for these environment
85
85
86
86
#### React runtime version
87
87
88
-
For React web app, it is important to have all React components rendered with the same version and instance of React runtime.
88
+
For React web apps, it is important to have all React components rendered with the same version and instance of the React runtime.
89
89
90
90
To choose between different version of React runtime, modify the import map and reference the version of your choice. React runtime must be loaded as ES Modules (ESM) instead of UMD. You may need to use a smart CDN service to load React runtime as ESM.
91
91
@@ -151,7 +151,8 @@ React runtime can also be loaded from UMD (`globalThis.React` and `globalThis.Re
151
151
152
152
### (Deprecated) IIFE/UMD: Import via `<script>`
153
153
154
-
> Notes: this method is deprecated and is no longer recommended. Please [import via `<script type="importmap">`](#esm-import-via-script-typeimportmap) instead.
154
+
> Note: This method is deprecated and is no longer recommended. Please [import via `<script type="importmap">`](#esm-import-via-script-typeimportmap) instead.
155
+
>
155
156
>
156
157
> W3C and browser vendors introduced a modern approach to import JavaScript code into the browser environment. Compare to the traditional IIFE/UMD approach, ES Modules has zero pollution and more guardrails to prevent misuse.
> Notes: Web Chat is a UI component, does not contains any network code, and is not responsible for communicating with the chat service. Web Chat render the messages (a.k.a. activities) provided by the chat adapter.
195
+
> Note: Web Chat is a UI component, does not contains any network code, and is not responsible for communicating with the chat service. Web Chat render the messages (a.k.a. activities) provided by the chat adapter.
195
196
196
197
Chat adapter is an intermediate component which bridge between Web Chat and the underlying chat service.
197
198
@@ -201,7 +202,7 @@ By using different chat adapter, Web Chat can connect to different chat service.
201
202
202
203
The chat adapter for Azure Bot Services (Direct Line) is bundled into Web Chat. A Direct Line token is required to establish the connection with Azure Bot Services. [This article](https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-authentication?view=azure-bot-service-4.0#generate-a-direct-line-token) contains instructions on generating and renew a Direct Line token.
203
204
204
-
> Notes: the Direct Line token is the key to the conversation, which could contains user data. Please protect the token with great care.
205
+
> Note: the Direct Line token is the key to the conversation, which could contains user data. Please protect the token with great care.
0 commit comments