Closed kinghat closed 3 years ago
Bump.
I see this issue happening, too. I may look into the source code here and see what's going on this week.
I'm experiencing more or less the same issue. Even if i do not apply any change from the popup, but i use it to trigger a new store read from the background it works. Didi you find anything on it? It could be useful even a callback to be triggered on the background when the extension find the localstorage state to be loaded
It's by design, I do that logic on purpose for performance, the plugin didn't write anything to localstorage if you didn't proc any mutation, because the default states are always loaded on store initialization from the store files and do a localstorage load/read are redundant, because the store states didn't change.
For now I gona close the issue because isn't it if I didnt missunderstand.
@kinghat , @mrboomer , @s1gmund80 someone of you can provide me more details why the write of default states on initialization are needed?
when you first load an extension the state is not set to local storage. when i load an extension for the first time i get this from the
background-script
:this is from the
vuex-webextensions
example extension. if you make a mutation frompopup
/content-script
, then localstorage is set:is this by design or should state be set to localstorage on install?