You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be no reason to create a Readable store which does not change. Still, not only the Readable Store api allows it, but there is a test for it, demonstrating this is intentional (
As for why you might want a store that does not change - if you have some component/API that expects one of its props to be passed as a store, but you, the creator of the component or caller of the API, know that that value is never going to need to change, you can pass this constant store to the component/API.
Describe the problem
There seems to be no reason to create a Readable store which does not change. Still, not only the Readable Store api allows it, but there is a test for it, demonstrating this is intentional (
svelte/test/store/index.ts
Line 144 in 5a3a1e4
This seems a meaningless change, but it may help people seeing stores for the first time.
Describe the proposed solution
I would like to make
start
mandatory for creating a readable store.Alternatives considered
Explain why it should be optional.
Importance
nice to have
The text was updated successfully, but these errors were encountered: