@@ -2237,21 +2237,17 @@ Deferring / Lazy Loading Components
2237
2237
-----------------------------------
2238
2238
2239
2239
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 ``).
2249
2244
2250
2245
.. note ::
2251
2246
2252
2247
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.
2255
2251
2256
2252
Loading "defer" (Ajax on Load)
2257
2253
~~~~~~~~~~~~~~~
0 commit comments