Share state between components when keeping everything inside one component no longer makes sense.
Sometimes multiple components need access to the same piece of state. Svelte provides stores and other state-sharing patterns so data does not have to be passed through many layers of components.
Shared state is useful for things such as authentication information, application preferences, shopping carts, and global UI state. The key is to share state intentionally rather than making everything global, because too much shared state can make an application harder to reason about.
What you'll walk away knowing