Git Product home page Git Product logo

nuxt-lazy-hydrate's Introduction

nuxt-lazy-hydrate

This module is a wrapper around Vue 3 Lazy Hydration Plugin for Nuxt 3.

Huge kudos to the package author and also to Markus Oberleihner for developing this amazing idea.

Make sure to give a star to both of these projects:

Setup

yarn add nuxt-lazy-hydrate # yarn
npm i nuxt-lazy-hydrate # npm

Usage

The only thing you need to do to use the module in the default configuration is to register the module in the modules array in nuxt.config.ts:

// nuxt.config.js

{
  modules: ["nuxt-lazy-hydrate"],
}

And that's it! You can now use the NuxtLazyHydrate component in your Nuxt app:

<template>
  <div>
    <NuxtLazyHydrate when-idle>
      <p>Nuxt module playground!</p>
    </NuxtLazyHydrate>
  </div>
</template>

For all configuration options of this component, please head out to Vue 3 Lazy Hydration Package

Development

  • Run npm run dev:prepare to generate type stubs.
  • Use npm run dev to start playground in development mode.

nuxt-lazy-hydrate's People

Contributors

baroshem avatar frsgit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

frsgit

nuxt-lazy-hydrate's Issues

Hydration node mismatch Nuxt 3

Hello dear,
I use it in Nuxt 3 project, but i get this: [Vue warn]: Hydration node mismatch
How should I solve it?

"devDependencies": {
      "nuxt": "3.5.3",
}
"dependencies": {
      "nuxt-lazy-hydrate": "^1.0.0",
}

nuxt.config.ts:

modules: [
    '@pinia/nuxt',
    'nuxt-lazy-hydrate'
  ],

and I use it like this:

 <NuxtLazyHydrate :when-visible="true">
    <MyComponentWithFetchData />
 </NuxtLazyHydrate>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.