0.2.0 • Published 8 months ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
8 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

8 months ago

0.1.0

8 months ago

0.0.6

9 months ago

0.0.5

10 months ago

0.0.4

11 months ago

0.0.3

12 months ago

0.0.2

12 months ago