Code snippets and guidelines for common scenarios
powersync-react
package is available containing React hooks for PowerSync:
watch
method can be used with a AsyncIterable
signature as follows:
watch
method can also be used with a callback:
downloadProgress
property from the SyncStatus class. This is especially useful for long-running initial syncs. downloadProgress.downloadedFraction
gives you a value from 0.0 to 1.0 representing the total sync progress.
Example: