svelte-store
in VanillaJS
/example
import { makeStore } from "../index.js";
export const myStore = makeStore({ foo: "bar" });
import { myStore } from "./actualStores.js";
myStore.subscribe((currentNewValue) => {
console.log("new value in", currentNewValue);
});
import { myStore } from "./actualStores.js";
myStore.set("New Value");
import { myStore } from "./actualStores.js";
myStore.update((oldValue) => {
return oldValue.toString() + "updated";
});
Licensed under the MIT License - LICENSE