A Single Page Application (SPA) is a term for applications that are as a single HTML page that has no preloaded content. Content is loaded via Javascript files for the entire application and housed within a single HTML page. The Javascript files house all of the data relating to the application logic, UI, and communication with the server. Popular Javascript frameworks and libraries for building SPAs include React, AngularJS, Vue.js, Ember.JS and Svelte, among others.
preezie widgets with SPA
As preezie’s scripts run on render, the widgets requires a slightly different setup when embedded within SPA frameworks:
The widgets must reside in the page it is displayed. Adding preezie at a global level may lead to issues when navigating between pages.
It is recommended to add preezie during component mount (or equivalent event based on SPA libraries).
Below is a sample implementation using Vue.js