[Vuejs]-Vue infinite load duplicate content issue

0👍

Try to set a different :key in your v-for. This is important for Vue to know which element is already rendered, and which should be re-rendered.

I don’t know what your data looks like but you should have a uniq id for every items, or a name…

Using the index on dynamic lists will likely cause unecessary re-renders.

<div
  class="media"
  v-for="message in messages"
  :key="message.id"
>
  ...
</div>

0👍

i remove vue-infinite-loading and end up with this solution Preserve scroll position on DOM update in vue.js . everything work fine now!

Leave a comment