Nuxt Helpers
In this example:
pages/index.vue
shows:
$nuxt.isOnline
and$nuxt.isOffline
- tells the user if they are online or offline.renderedOn
- prints a message telling us if the page is rendered on the server or client.$nuxt.refresh()
- refreshes data without refreshing the page.
plugins/nuxt-ready.client.js
shows:
window.onNuxtReady
- logs a message to the console when Nuxt is ready.
Learn more in the Concepts book in the Context and Helpers chapter.
Loading CodeSandbox...