feat: move from life cycle to data or watcher
- remove from created / mounted - initialize component services in data - use immediate watcher where appropriate - deep watch for route changes
This commit is contained in:

committed by
kolaente

parent
ebeca48be4
commit
f51371bbe0
@ -61,15 +61,12 @@ export default {
|
||||
components: {User},
|
||||
data() {
|
||||
return {
|
||||
notificationService: NotificationService,
|
||||
notificationService: new NotificationService(),
|
||||
allNotifications: [],
|
||||
showNotifications: false,
|
||||
interval: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.notificationService = new NotificationService()
|
||||
},
|
||||
mounted() {
|
||||
this.loadNotifications()
|
||||
document.addEventListener('click', this.hidePopup)
|
||||
|
Reference in New Issue
Block a user