Client side renderer.
new
Mizu(options?: ClientOptions)
Client
constructor.
readonly
context: Record<PropertyKey, any>
Rendering context.
All properties assigned to this object are available during rendering.
Changes to this object are reactive and will trigger a re-render of related elements.
This is achieved using Context
, which leverages Proxy
handlers.
Note
You cannot reassign this property directly to ensure reactivity is maintained.
To achieve a similar effect, use Object.assign()
.
render<T extends Arg<Renderer["render"]>>(element?: T,options?: ClientRenderOptions,): Promise<T>
Start rendering all subtrees marked with the *mizu
attribute.
const mizu = new Client({ context: { foo: "bar" } }) await mizu.render()