API reference › @evolu/vue › EvoluAppProvider
const EvoluAppProvider: DefineComponent<
ExtractPropTypes<{
app: {
required: true;
type: PropType<EvoluApp<any, any>>;
};
}>,
() =>
| VNode<
RendererNode,
RendererElement,
{
[key: string]: any;
}
>
| VNode<
RendererNode,
RendererElement,
{
[key: string]: any;
}
>[]
| null
| undefined,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
ToResolvedProps<
ExtractPropTypes<{
app: {
required: true;
type: PropType<EvoluApp<any, any>>;
};
}>,
{}
>,
{},
SlotsType<{
default?: () => VNode<
RendererNode,
RendererElement,
{
[key: string]: any;
}
>[];
opening?: () => VNode<
RendererNode,
RendererElement,
{
[key: string]: any;
}
>[];
withoutAppOwner?: () => VNode<
RendererNode,
RendererElement,
{
[key: string]: any;
}
>[];
}>,
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>;
Defined in: EvoluAppProvider.ts:44
Provides an EvoluApp to its slots. The default slot gets the instance
of the AppOwner this tab has open, so useEvolu and the query
composables read that AppOwner's data, and useEvolu().appOwner is that
AppOwner. The slot remounts when the tab opens another AppOwner, or the
AppOwner again after a removal and restore or its database's deletion. While
the tab has no AppOwner open, such as on a device without one or after a
removal of the open one, it renders the withoutAppOwner slot, such as a
choice to open one of useAppOwners, create one, or restore one. While
the AppOwner's instance opens, it renders the opening slot, such as a
spinner, and nothing without it. Each slot can call useEvoluApp.
The app prop is read once, so pass the resolved app, such as one awaited in
<script setup> under <Suspense>.