Wiki source code of Live Data Component Store API

Last modified by Manuel Leduc on 2026/03/24 11:15

Show last authors
1 Provide the operations to register and resolve Live Data components.
2
3 == register ==
4
5 Add a new component to the store.
6
7 {{code language="typescript"}}
8 register(
9 kind: string,
10 key: string,
11 componentProvider: () => Promise<Component>,
12 ): void
13 {{/code}}
14
15 === Parameters ===
16
17 * ##kind: string##: the kind of the registered component
18 * ##key: string##: the unique component key in the kind
19 * ##componentProvider: () => Promise<Component>##: an asynchronous provider of the component to register. Only resolved when loaded.
20
21 == load ==
22
23 Resolve a component of the given kind by its key. A Promise is returned, allowing to wait for the component to be registered before continuing.
24
25 {{code language="typescript"}}
26 load(kind: string, key: string): Promise<Component | (() => Promise<Component>)>
27 {{/code}}
28
29 === Parameters ===
30
31 * ##kind: string##: the kind of the registered component
32 * ##key: string##: he unique component key in the kind

Get Connected