Skip to main content

createPowerSyncPlugin()

function createPowerSyncPlugin(powerSyncPluginOptions): {
install: (app) => void;
}

Create a Vue plugin to define the PowerSync client. Client will be provided app-wide (highest position in component hierarchy).

Needs to be installed on a Vue instance using app.use().

Parameters

ParameterType
powerSyncPluginOptionsobject
powerSyncPluginOptions.databaseMaybeRef<AbstractPowerSyncDatabase>

Returns

{
install: (app) => void;
}
MemberType
install(app) => void