@powersync/react
Interfaces
AdditionalOptions
Extends
HookWatchOptions
Properties
Property | Type | Description | Inherited from |
---|---|---|---|
rawTableNames? | boolean | Deprecated 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 prefixes | HookWatchOptions.rawTableNames |
reportFetching? | boolean | - | HookWatchOptions.reportFetching |
runQueryOnce? | boolean | - | - |
tables? | string [] | - | HookWatchOptions.tables |
throttleMs? | number | The minimum interval between queries. | HookWatchOptions.throttleMs |
triggerImmediate? | boolean | Emits an empty result set immediately | HookWatchOptions.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
Function | Description |
---|---|
usePowerSync | Custom hook that provides access to the PowerSync context. |
- | |
- | |
- | |
useQuery | A hook to access the results of a watched query. |
useStatus | Custom hook that provides access to the current status of PowerSync. |
useSuspenseQuery | A hook to access the results of a watched query that suspends until the initial result has loaded. |
useWatchedQuerySubscription | A hook to access and subscribe to the results of an existing WatchedQuery instance. |
useWatchedQuerySuspenseSubscription | A hook to access and subscribe to the results of an existing WatchedQuery. |