Skip to content

v2.4.5

Latest
Compare
Choose a tag to compare
@smastrom smastrom released this 01 Sep 22:08

Release notes

The next patch release updates the Vue version used to compile Notivue's components and ships a full rework of the Astro implementation without any API changes.

Core

Since Vue v3.5 entered the RC stage last week and v3.4 downloads surpassed by at least 4 times the downloads of v3.3, components are now compiled using the latest v3.4 stable version, upgrading from v3.3 as Notivue is always compiled with the previous most-downloaded minor release of Vue.

Astro Module

By design, Astro creates a new Vue app for each Vue island inserted in the markup of an Astro component or page. This means that if a plugin such as notivue is installed in pages/_app.js/ts and 5 Vue components are imported in the Astro markup, Notivue will be installed in all of the 5 Vue apps created by Astro when rendering the island in isolation. This started causing some hydration and View Transitions related issues since Astro v4.

Starting from this release, only one Vue app is created when installing Notivue as the store is now provided by simply calling provide() in the <Notivue /> setup function instead of app.provide during plugin installation.

This ensures that the notification state is always retained between page navigation and that by calling push, notifications are dispatched, received, and processed by the same Vue app.

In order to keep the API consistent with Vue/Nuxt and previous versions it is still needed to call createNotivue in _app.js/ts which does nothing than exposing the initial config to the Vue app.

Check the docs on how to implement Notivue with Astro's View Transitions.