PollingSubscription
Will dispatch a fetch action at the minimum interval of all subscriptions to this
resource.
- Pauses when offline.
- Immediately fetches when online status returns.
- On the first subscription, fetches when the data is one interval old. If the data is older, fetches at once.
implements
PollingSubscription implements Subscription
main.ts
import { createApp } from 'vue';
import {
DataClientPlugin,
NetworkManager,
SubscriptionManager,
PollingSubscription,
} from '@data-client/vue';
import App from './App.vue';
const managers = () => [
new NetworkManager(),
new SubscriptionManager(PollingSubscription),
];
const app = createApp(App);
app.use(DataClientPlugin, { managers });
app.mount('#app');
Dispatched Actions
- 'rdc/fetch'
Note:
This is already used by
DataClientPluginby default.