loading...

Discussion on: Handling Service Worker updates in your Vue PWA

Collapse
positivethinking639 profile image
positivethinking639

Hi. I want to ask. I had try your code and it works. I don't want to show the snackbar message. So I deleted this code : <v-snackbar bottom right :value="updateExists" :timeout="0" color="primary">
An update is available
<v-btn text @click="refreshApp">
Update
</v-btn>
</v-snackbar>
. It worked and there were no problems. Changes are automatically updated without clicking the update button. How do you think?

Collapse
positivethinking639 profile image
positivethinking639

I try another option like this : methods: {
updateAvailable (event) {
this.registration = event.detail
this.updateExists = true
this.refreshApp()
}
. So if detect new version, it immediately called refreshApp method. So user don't need to click the update button