Is it possible to display toast message notification only once when user login to system on a home page?
I don't want toast message appear every time if I navigate to home page multiple time?
Wanted to know if its possible in LWC or AURA?
Yes, we can achieve this. We have to do these steps:
Here is the sample code of AURA:
var isFirstView = localStorage.getItem('isFirstView') || '';
if (isFirstView !== 'Yes') {
/* Show message to use as this is first view. */
localStorage.setItem('isFirstView', 'Yes');
}
In my requirement I wanted to use local storage.