Events
Your application can listen to events for when data changes in your application.
Data changes
Once a datastore
or database
is opened, you can listen to changes to automatically update your application:
Try this out with your own profile data in the browser in our tutorial.
Options:
filter
: An optional JSON object. The listener will only raise events if the data in the object matches the supplied filter.
You can cancel the event listener:
Similarly you can call:
Inbox messages
You can be notified when a new inbox message arrives for your application:
Database sync changes
Data is automatically synchronized from remote encrypted servers to the local client. It’s possible to listen to events related to this syncing behavior:
A full list of events is available via the PouchDB Documentation
Last updated