vue-agile icon indicating copy to clipboard operation
vue-agile copied to clipboard

SSR render mismatch

Open mfrascati opened this issue 4 years ago • 5 comments

Just check the demo repo, you'll have this error in console

image

At a first glance it seems that the problem could be connected to the "currentSlide" value. If you look close on page load none of the dots is marked as active, while after page refresh the first one is.

Setting { dots: false } on <agile> and restoring to true after mounted(), works as a temporary fix.

mfrascati avatar Apr 29 '20 14:04 mfrascati

Right. Thanks, I'll check that.

lukaszflorczak avatar Apr 29 '20 18:04 lukaszflorczak

Branch issue-163 created!

@lukaszflorczak I have same problem. Are there any news? 🙃

altynbek07 avatar Jul 10 '20 09:07 altynbek07

Just noting – still an issue today Screen Shot 2022-08-17 at 3 32 37 PM

proxycase avatar Aug 17 '22 20:08 proxycase

I had the same problem, it's ugly, but I solved it with:

  <VueAgile
    :dots="showCarousel"
    :initial-slide="activeIndex"
    @before-change="onChangeSlide"
  >

....

  data() {
    return {
      showCarousel: false,
    };
  },
  mounted() {
      this.showCarousel = true;
  },

(Acutally I just realized, that @mfrascati already wrote, that it worked for him like that...)

sinasita avatar Aug 19 '22 08:08 sinasita