Create a Rezi application instance.
Application options
An App instance
const app = createApp({ backend: createNodeBackend(), initialState: { count: 0 },});app.view((state) => ui.column({ p: 1 }, [ ui.text(`Count: ${state.count}`), ui.button({ id: "inc", label: "+1" }), ]));await app.start(); Copy
const app = createApp({ backend: createNodeBackend(), initialState: { count: 0 },});app.view((state) => ui.column({ p: 1 }, [ ui.text(`Count: ${state.count}`), ui.button({ id: "inc", label: "+1" }), ]));await app.start();
Application state type
Runtime backend (e.g., createNodeBackend())
Initial application state
Optional configuration overrides
App instance with view/draw, update, start/stop/dispose methods
const app = createApp({ backend: createNodeBackend(), initialState: { count: 0 },});app.view((state) => ui.text(`Count: ${state.count}`));await app.start(); Copy
const app = createApp({ backend: createNodeBackend(), initialState: { count: 0 },});app.view((state) => ui.text(`Count: ${state.count}`));await app.start();
Create a Rezi application instance.
Param: opts
Application options
Returns
An App instance
Example