vuejs-paginate
vuejs-paginate copied to clipboard
its not work with ssr, not usable in nuxtjs ssr
[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered
content. This is likely caused by incorrect HTML markup, for example nesting block-level
elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side
render.
it has to be capable of ssr and nuxtjs as well.
add tag client-only
@dikymury can you please explain more detail?
@MicroDreamIT https://nuxtjs.org/api/components-client-only#the-lt-client-only-gt-component
@MicroDreamIT you will have to conditionally require the lib too, instead of
import Paginate from 'vuejs-paginate'
use
const Paginate = process.client ? require('vuejs-paginate') : undefined
@MicroDreamIT import the library like this:
import Paginate from 'vuejs-paginate/src/components/Paginate'
Do not use client-only.
@MicroDreamIT import the library like this:
import Paginate from 'vuejs-paginate/src/components/Paginate'
Do not use client-only.
could you elaborate?
add tag client-only
I made the same, helped. But strange that in plugins scope in Nuxt config I used client mode, and this is doesn't help before,