@tempots/dom
Use() function
Creates a renderable function that consumes data from multiple consumers and renders the result.
Signature:
Use: extends Record<string, Consumer<unknown>>>(consumers: C, fn: (data: UseMany) => Renderable) => Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
consumers |
C |
An object containing consumer functions. |
fn |
(data: UseMany |
A function that receives the data from the consumers and returns a renderable function. |
Returns: Renderable
A renderable function that can be called with a DOMContext and returns a cleanup function.