Skip to main content

@powersync/react

Interfaces

AdditionalOptions

Extends

  • HookWatchOptions

Properties

PropertyTypeDescriptionInherited from
rawTableNames?booleanDeprecated All tables specified in tables will be watched, including PowerSync tables with prefixes. Allows for watching any SQL table by not removing PowerSync table name prefixesHookWatchOptions.rawTableNames
reportFetching?boolean-HookWatchOptions.reportFetching
runQueryOnce?boolean--
tables?string[]-HookWatchOptions.tables
throttleMs?numberThe minimum interval between queries.HookWatchOptions.throttleMs
triggerImmediate?booleanEmits an empty result set immediatelyHookWatchOptions.triggerImmediate

Type Aliases

SuspenseQueryResult<T>

type SuspenseQueryResult<T> = Pick<QueryResult<T>, "data" | "refresh">;

Type Parameters

Type Parameter
T

Variables

PowerSyncContext

const PowerSyncContext: Context<AbstractPowerSyncDatabase>;

Functions

FunctionDescription
usePowerSyncCustom hook that provides access to the PowerSync context.
usePowerSyncQuery-
usePowerSyncStatus-
usePowerSyncWatchedQuery-
useQueryA hook to access the results of a watched query.
useStatusCustom hook that provides access to the current status of PowerSync.
useSuspenseQueryA hook to access the results of a watched query that suspends until the initial result has loaded.
useWatchedQuerySubscriptionA hook to access and subscribe to the results of an existing WatchedQuery instance.
useWatchedQuerySuspenseSubscriptionA hook to access and subscribe to the results of an existing WatchedQuery.