Rezi
    Preparing search index...

    Function createApp

    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();
    • Create a Rezi application instance.

      Type Parameters

      • S

        Application state type

      Parameters

      • opts: Readonly<
            {
                backend: RuntimeBackend;
                config?: AppConfig;
                initialState: S;
                theme?: Theme
                | ThemeDefinition;
            },
        >
        • backend

          Runtime backend (e.g., createNodeBackend())

        • initialState

          Initial application state

        • config

          Optional configuration overrides

      Returns App<S>

      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();