Learn Vue JS course Learn Javascript and Vue JS Learn VueJS course Learn VueJS Tutorial

Vue.js 3 Options API Masterclass

Using the Server Timestamp for Post Published At thumbnail image

Get access to the most comprehensive Vue.js video library in the world. Over 300 video lessons including the newest Vue 3 features.

Using the Server Timestamp for Post Published At

🚧 PLEASE NOTE: This masterclass is built with the Options API
vuejs-masterclass

The Composition API Masterclass is coming soon!

In this lesson, we use the Firstore server timestamp to set the publishedAt property on newly created posts. While Date.now() is readily available in Javascript the serverTimestamp ensures better consistency and accuracy for the timestamps.