This is an excerpt from Manning's book Svelte and Sapper in Action. Login to get full access to this book.
To create a writable store, call the writable function, which is defined in the svelte/store package. Pass an initial value and optionally a function that initializes the store. The use of such a function is described later.
writable
svelte/store