Skip to main content

useSyncStream()

function useSyncStream(options): SyncStreamStatus

Creates a PowerSync stream subscription. The subscription is kept alive as long as the React component calling this function. When it unmounts, SyncStreamSubscription.unsubscribe is called

For more details on sync streams, see the documentation.

Parameters

ParameterType
optionsUseSyncStreamOptions

Returns

SyncStreamStatus

The status for that stream, or null if the stream is currently being resolved.