The type of HTML element being rendered
The type of the dependencies object
The unwrapped values from the store dependencies
Additional options and utilities for rendering:
A string, builder instance, or void
// Using the first parameter to conditionally render initial state
const [element] = cf.nu("div")
.deps({ count: counterStore })
.render(({ count }, { b, first }) => {
// Do one-time setup on first render
if (first) {
b.attr("data-initialized", "true");
b.style("transition", "all 0.3s ease");
}
return b.content(`Count is: ${count}`);
})
.done();
Function signature for rendering reactive content.