Useful Tools In Vue.js Web Development
You can install vue-notification in your project using either Yarn or NPM depending on the package manager for your project
yarn add vue-notification
npm install –save vue-notification
After the installation is complete, the next thing would be to add it to the entry point in your app, the main.js file.
//several lines of existing code in the file
import Notifications from ‘vue-notification’
Vue.use(Notifications)
At this point, we only need to add the notifications component in the App.vue file before we can display notifications in our app. The reason why we’re adding this component to the App.vue file is to avoid repetition in our application because no matter the page the user is on in our app, components in App.vue (e.g the header & footer components) would always be available. This takes the pain of having to register the notification component in every file that we need to display a notification to the user.