How change meta tag "theme-color"
on change Vuex
state?
Using: Vue, Vuex, register-service-worker, @vue/cli-plugin-pwa
Asked
Active
Viewed 514 times
1

MjM
- 571
- 4
- 15

Ruslan Melnychenko
- 115
- 1
- 5
1 Answers
1
You should dispatch
an event, inside of it, in your store file, change the meta tag like so:
document.querySelector('meta[name="theme-color"]').setAttribute("content", yourValueHere);
More info: https://stackoverflow.com/a/36073112/2745485

Yousof K.
- 1,374
- 13
- 23