[Vuejs]-Prevent vue.js from re-rendering data?

0👍

Fixed by using unshift and push to prepend and append when needed:

const offSet = state.currentPage * state.itemsPerPage;

const start = payload.slice(0, offSet - state.itemsPerPage);
const end = payload.slice(offSet);

rootState.filters.data.unshift(...start);
rootState.filters.data.push(...end);

This leaves the array intact and it works with pagination. This way no re-render is being done by Vue.js

Leave a comment