initial value of a new writable store.
Either an object with store options, or directly the onUse function.
The onUse function is a function called when the number of subscribers changes from 0 to 1 (but not called when the number of subscribers changes from 1 to 2, ...).
If a function is returned, it will be called when the number of subscribers changes from 1 to 0.
const x = writable(0);
x.update(v => v + 1); // increment
x.set(0); // reset back to the default value
Generated using TypeDoc
A convenience function to create Writable store instances.