Wrapper for VK Connect for simply use storage
yarn add vk-storage
or npm i vk-storage --save
import VKStorage from "vk-storage";
import connect from "@vkontakte/vkui-connect-promise";
VKStorage.init({ access_token: "<TOKEN>", connect }).catch(console.error);
VKStorage.subscribe(console.log);
VKStorage.set("field", "value");
VKStorage.get("field");
VKStorage.subscribe((store) => {
// your code
});