$nuxt: The NuxtJS helper

$nuxt is a helper designed to improve user experience.

  • isOffline
    • Type: Boolean
    • Description: true when the user's internet connection becomes offline
  • isOnline
    • Type: Boolean
    • Description: Opposite of isOffline

Example:

layouts/default.vue:

  1. <template>
  2. <div>
  3. <div v-if="$nuxt.isOffline">You are offline</div>
  4. <nuxt/>
  5. </div>
  6. </template>