[Vuejs]-SSR Hydration Vue js Nuxt

0👍

I have resolved the issue by converting the Date object to a Firebase timestamp like so:

const now = this.$fireModule.firestore.Timestamp.fromDate(new Date());
        const querySnapshot = await this.$fire.firestore.collection("blogPosts")
          .where("publishedDate", "<", now)
          .orderBy("publishedDate", "desc")
          .limit(3)
          .get();

However, I don’t understand why this caused an issue and why Date can be use server side. If any one could share some light on this it would be great!

Leave a comment