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