Skip to content

Type Alias: MakaioWebUiComponentProps<TLoaderData, TActions>

Makaio Framework


Makaio Framework / contracts / MakaioWebUiComponentProps

Type Alias: MakaioWebUiComponentProps<TLoaderData, TActions>

Section titled “Type Alias: MakaioWebUiComponentProps<TLoaderData, TActions>”

MakaioWebUiComponentProps<TLoaderData, TActions> = object

Defined in: ../../../packages/contracts/src/extension/contributions/web-ui-types.ts:81

Props passed to a WebUI component.

Provides type-safe access to loader data, Promise-based action executors, and the LoaderContext that was active when the loader ran.

TLoaderData = unknown

Type of data returned by the loader.

TActions extends MakaioWebUiActions = MakaioWebUiActions

Record of available actions.

actions: TActions extends MakaioWebUiActions ? PromisifiedActions<TActions> : Record<string, never>

Defined in: ../../../packages/contracts/src/extension/contributions/web-ui-types.ts:88

Promisified action executors for mutating server-side state.


loaderContext: LoaderContext

Defined in: ../../../packages/contracts/src/extension/contributions/web-ui-types.ts:90

The loader context that was active when the loader ran.


loaderData: TLoaderData

Defined in: ../../../packages/contracts/src/extension/contributions/web-ui-types.ts:86

Data resolved by the loader before the component was rendered.

  • MakaioWebUiComponentProps
    • { /** Data resolved by the loader before the component was rendered. */ loaderData: TLoaderData; /** Promisified action executors for mutating server-side state. */ actions: TActions extends MakaioWebUiActions ? PromisifiedActions<TActions> : Record<string, never>; /** The loader context that was active when the loader ran. */ loaderContext: LoaderContext; }
type MakaioWebUiComponentProps = {
loaderData: TLoaderData;
actions: TActions extends MakaioWebUiActions ? PromisifiedActions<TActions> : Record<string, never>;
loaderContext: LoaderContext;
};