The Vue.js Master Class 2024 Edition
Plans from $25/month

This lesson is for members. Join us?

Subscribe now and get immediate access to this course, 30 more and all future Vue.js courses!

Fix a Little Bug with the Project Title Watcher

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

The Composition API Masterclass is coming soon!

Our project title watcher needs a fix—right now, it’s not updating the page title when we revisit the same project. This happens because watchers only trigger on value changes, and since the project data is cached in Pinia, revisiting doesn’t count as a “change.” Here, we’ll tweak the logic to ensure that page titles update reliably, even for cached projects.

Links