State Management with Svelte Stores

Every user interface control has a state. A checkbox has a checked-unchecked state. A textbox’s state is its current input value. A table’s state is the data displayed and the columns currently being sorted. Sometimes when you have multiple user interface controls present across the screen at the same time, you need to synchronize the state across them—this is where state management comes in.

In this chapter, we are going to discuss managing states in Svelte using Svelte stores. We will start with why we should use Svelte stores, and then discuss tips that will help you when using Svelte stores for state management.

Next, we will go into the topic of using state management libraries. We will talk about ...

Get Real-World Svelte now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.