Svelte.js deriving stores of stores

Gustav Corpas
5 min readNov 9, 2023
Svelte.js

This article is about working with nested stores, or stores of stores, or reactive arrays of stores, or whatever you would want to call them. Basicly this:

const stores = writable([writable(0), writable(0)]);

Why would you want this? Weeell, that part is up to you.. But if you find yourself doing this, stop for a second and consider if you are over-complicating things or if

--

--

Gustav Corpas

I write about technology and society. Or anything that is interesting to me.