gangsthub / nuxt-periodic-fetching-in-plugin-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nuxt-periodic-fetching-in-plugin-example

Requirements:

  • fetch once on the server
  • make response available for client
  • periodically fetch the same endpoint afterwards.

If this is run locally, you should see a different value on screen passed 5 seconds, because the initial value was set on server-side and then, reactively, it's updated on the client side.

Installation

npm i
## or
yarn

Dev

npm run dev
## or
yarn dev

About


Languages

Language:TypeScript 91.9%Language:Vue 8.1%