Huge fan of custom Svelte 5 state runes compared to stores, and using classes.
✔︎ Easier to read and thus reason about
✔︎ Easier to test – just instantiate and use
Few LayerStack examples that demonstrate this 👇
✔︎ Easier to read and thus reason about
✔︎ Easier to test – just instantiate and use
Few LayerStack examples that demonstrate this 👇
Comments
https://github.com/techniq/layerstack/blob/next/packages/svelte-stores/src/lib/paginationStore.ts
https://github.com/techniq/layerstack/blob/next/packages/svelte-state/src/lib/paginationState.svelte.ts
https://github.com/techniq/layerstack/blob/next/packages/svelte-state/src/lib/paginationState.test.svelte.ts
https://github.com/techniq/layerstack/blob/next/packages/svelte-stores/src/lib/selectionStore.ts
https://github.com/techniq/layerstack/blob/next/packages/svelte-state/src/lib/selectionState.svelte.ts
https://github.com/techniq/layerstack/blob/next/packages/svelte-state/src/lib/selectionState.test.svelte.ts