This is a Proof of Concept (POC) demo that illustrates how to integrate real-time notifications in a Nuxt.js application using Vue Toastification.
- Real-time Notifications: Using
Vue Toastification
. - Nuxt.js 3: Next generation Vue.js framework.
- Node.js
- PNPM (Package manager)
cd packages/front
Use PNPM to install the required packages:
pnpm install
To start the development server, run:
pnpm run dev
This project employs vue-toastification
for managing notifications. Initialization is done in plugins/toast.js
.
-
Import
useToast
:import { useToast } from "vue-toastification";
-
Initialize in the
setup
function:const toast = useToast();
-
Trigger a Notification:
toast.success("Notification content", { timeout: 2000, });