Skip to content

Commit 54884b2

Browse files
committed
Rewrite loading paragraph
1 parent dd11095 commit 54884b2

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,21 +2237,17 @@ Deferring / Lazy Loading Components
22372237
-----------------------------------
22382238

22392239
When a page loads, all components are rendered immediately. If a component is
2240-
heavy to render, you can defer its rendering after the page has loaded.
2241-
2242-
Moreover, some components are not needed until the user scrolls to them (like
2243-
components at the bottom of a long page like comments, related products, etc.).
2244-
In this case, you can load them "lazily" when they are in the viewport.
2245-
2246-
By loading a component asynchronously, the page will load faster and the user
2247-
will be able to interact with it sooner, improving both the user experience
2248-
and the overall performance of your application.
2240+
heavy to render, you can defer its rendering until after the page has loaded.
2241+
This is done by making an Ajax call to load the component's real content either
2242+
as soon as the page loads (``defer``) or when the component becomes visible
2243+
(``lazy``).
22492244

22502245
.. note::
22512246

22522247
Behind the scenes, your component *is* created & mounted during the initial
2253-
page load, but its template isn't rendered. So keep your heavy work to methods in
2254-
your component (e.g. ``getProducts()``) that are only called when rendering.
2248+
page load, but its template isn't rendered. So keep your heavy work to
2249+
methods in your component (e.g. ``getProducts()``) that are only called
2250+
from the component's template.
22552251

22562252
Loading "defer" (Ajax on Load)
22572253
~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)