PeachScript / vue-infinite-loading

An infinite scroll plugin for Vue.js.
https://peachscript.github.io/vue-infinite-loading/
MIT License
2.66k stars 366 forks source link

Infinite loading is buggy on Nuxt SSR #315

Open akashrajum opened 3 years ago

akashrajum commented 3 years ago

Version

"vue-infinite-loading": "2.4.5",

Nuxt version

Nuxt: "2.15.7",

Steps to reproduce

https://app.usebubbles.com/eztqeMmdTtmfSLBrxRpDBD/infinite-scroll-bug-on-nuxt-ssr

What is Expected?

For it to work consistently

What is actually happening?

Not working consistently

akashrajum commented 3 years ago

Anyone coming across this, I solved it using - https://github.com/forked-prs/nuxt-infinite-scroll-module

Kolobok12309 commented 3 years ago

Also can use vue-infinite-loading/src/components/InfiniteLoading directly

imzedi commented 2 years ago

Use client only because it will require document that is not available on SSR

<client-only>
      <infinite-loading @infinite="infiniteHandler">
      </infinite-loading>
</client-only>