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
// LazyBoundary is Suspense on the client, and "nothing" on the server
147
+
// LazyBoundary is Suspense* on the client, and "nothing" on the server
148
148
<Component />
149
149
</LazyBoundary>
150
150
);
@@ -254,7 +254,7 @@ If you have `imported` definition in one file, and use it from another - just `i
254
254
255
255
-`importFunction` - function which resolves with Component to be imported.
256
256
-`options` - optional settings
257
-
-`options.async` - activates react suspense support. Will throw a Promise in a Loading State - use it with Suspense in a same way you use **React.lazy**.
257
+
-`options.async` - activates react suspense support. Will throw a Promise in a Loading State - use it with Suspense in a same way you use **React.lazy**. See [working with Suspense](working-with-suspense)
258
258
-`options.LoadingComponent` - component to be shown in Loading state
259
259
-`options.ErrorComponent` - component to be shown in Error state. Will re-throw error if ErrorComponent is not set. Use ErrorBoundary to catch it.
260
260
-`options.onError` - function to consume the error, if one will thrown. Will rethrow a real error if not set.
@@ -291,6 +291,10 @@ Hints:
291
291
- use `options.import=false` to perform conditional import - `importFunction` would not be used if this option set to `false.
292
292
- use `options.track=true` to perform SSR only import - to usage would be tracked if this option set to `false.
293
293
294
+
##### ImportedController
295
+
296
+
-`<ImportedControoler>` - a controller for Suspense Hydration. **Compulsory** for async/lazy usecases
297
+
294
298
##### Misc
295
299
296
300
There is also API method, unique for imported-component, which could be useful on the client side
@@ -442,12 +446,17 @@ Before rendering your application you have to ensure - all parts are loaded.
442
446
`rehydrateMarks` will load everything you need, and provide a promise to await.
0 commit comments