| Await | R Documentation |
https://api.reactrouter.com/v7/functions/react-router.Await.html
Await(
into = NULL,
as = "children",
resolveKey,
selector = NULL,
render = NULL,
errorElement = NULL,
fallback = NULL,
...
)
into |
A component (HTML tag or shiny.react-based element) that will receive the hook data as the specified prop. |
as |
Character. The name of the component's prop to inject the hook
data into (by default |
resolveKey |
Character. The key in the loader's return value that holds
the promise (e.g. if the loader returns |
selector |
Character. Optional key to extract from the hook data object.
If |
render |
Optional |
errorElement |
Element to render if the promise rejects. |
fallback |
Element shown while the promise is pending. Defaults to a
plain |
... |
Additional props to pass to the component. |
Renders into when a deferred loader promise resolves, injecting the
resolved value (or a selector from it) as a prop.
Use inside a Route whose loader returns an object
containing a promise (written via JS). In React Router v7,
simply return the object directly – no defer() wrapper is needed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.