Skip to content

Commit f6b43af

Browse files
committed
10.10.0.cl-preRender : format
1 parent 8d35895 commit f6b43af

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

modules/ROOT/pages/prerender.adoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
:page-pageid: prerender
77
:page-description: How to use pre-rendering to optimize performance and user experience in ThoughtSpot embedding
88

9-
+== Load Flow Diagrams
10-
+
11-
+The following diagrams illustrate how ThoughtSpot embed components load in a typical application, both for normal and pre-rendered scenarios. Reviewing these will help set the context for the strategies described in this guide.
12-
+
13-
+image::./images/pre-render/embed_load.png[]
14-
+image::./images/pre-render/liveboardEmbed_load.png[]
9+
== Load Flow Diagrams
10+
11+
The following diagrams illustrate how ThoughtSpot embed components load in a typical application, both for normal and pre-rendered scenarios. Reviewing these will help set the context for the strategies described in this guide.
12+
13+
image::./images/pre-render/embed_load.png[]
14+
image::./images/pre-render/liveboardEmbed_load.png[]
1515

1616
== How Embedding Normally Works (The Basics)
1717

@@ -70,9 +70,9 @@ The value of `preRenderId` can be any string, but it must match the `preRenderId
7070
Limitation: Any props you want to pass to the embed (such as configuration options) must be passed to the `PreRenderedLiveboardEmbed` component on the home page. If you later render a `LiveboardEmbed` with the same `preRenderId`, those new props will not be respected if the iframe is already loaded. This is a current limitation of the pre-rendering approach.
7171
====
7272

73-
.React Example
74-
[source,jsx]
73+
[example]
7574
----
75+
// React example
7676
import { LiveboardEmbed } from "@thoughtspot/visual-embed-sdk/react";
7777
7878
const PreRenderLiveboardWithLiveboardId = () => (
@@ -109,9 +109,9 @@ Again, the value of `preRenderId` can be any string, but it must match the `preR
109109
Limitation: Any props you want to pass to the embed must be passed to the `PreRenderedLiveboardEmbed` component on the home page. If you later render a `LiveboardEmbed` with the same `preRenderId`, those new props will not be respected if the iframe is already loaded.
110110
====
111111

112-
.React Example
113-
[source,jsx]
112+
[example]
114113
----
114+
// React example
115115
import { LiveboardEmbed } from "@thoughtspot/visual-embed-sdk/react";
116116
117117
const PreRenderLiveboardWithoutLiveboardId = () => (
@@ -140,9 +140,9 @@ This strategy does not require special configuration—simply pass a `preRenderI
140140
<LiveboardEmbed preRenderId="pre-render-on-demand" className="embed-div" />
141141
----
142142

143-
.React Example
144-
[source,jsx]
143+
[example]
145144
----
145+
// React example
146146
import { LiveboardEmbed } from "@thoughtspot/visual-embed-sdk/react";
147147
148148
const PreRenderEmbedOnDemand = () => (
@@ -158,9 +158,9 @@ image::./images/pre-render/preRender_on_demand.png[]
158158
- On every visit, the iframe is recreated and the embed loads from scratch.
159159
- Efficient if the embed is rarely used, but slow for the user every time.
160160

161-
.React Example
162-
[source,jsx]
161+
[example]
163162
----
163+
// React example
164164
import { AppEmbed } from "@thoughtspot/visual-embed-sdk/react";
165165
166166
const NormalEmbed = () => <AppEmbed className="embed-div" />;

0 commit comments

Comments
 (0)