Introduction
The subscribe method lets you watch for changes in a Svelte store. It helps your app update automatically when data changes.
You want to show live data that updates when the store changes.
You need to run code whenever the store value changes.
You want to connect a component to a shared state in your app.
You want to clean up listeners when a component is removed.