0.2.0 • Published 5 months ago

@pinia/colada-plugin-auto-refetch v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Automatically refetch queries when they become stale in Pinia Colada.

Installation

npm install @pinia/colada-plugin-auto-refetch

Usage

import { PiniaColadaAutoRefetch } from '@pinia/colada-plugin-auto-refetch'

// Pass the plugin to Pinia Colada options
app.use(PiniaColada, {
  // ...
  plugins: [
    PiniaColadaAutoRefetch({ autoRefetch: true }), // enable globally
  ],
})

You can customize the refetch behavior individually for each query with the autoRefetch option:

useQuery({
  key: ['todos'],
  query: getTodos,
  autoRefetch: true, // override local autoRefetch
})

License

MIT

0.2.0

5 months ago

0.1.0

6 months ago

0.0.6

6 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

9 months ago

0.0.2

9 months ago