-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Describe the bug
This is half bug, half proposal.
The current implementation of derived stores doesn't provide a way to use the store's existing value in the new value (a-la .update
).
You can see in the REPL my workaround for this is to use get(storeName)
which... sort of works.
The issue is that you get a console error which pertains to whatever the error you previously encountered was, which is written every time the store updates.
Logs
Error: Uncaught (in promise): thir is not defined
To Reproduce
https://svelte.dev/repl/df25b5983b8d464fb1e47af7a1d12d61?version=3.22.3
Expected behavior
The current behaviour is correct, aside from the error.
Information about your Environment:
- Svelte version 3.22.3
Severity
I do need to use the current store value in a derived store, as my derived store builds a set of results which need to be concatenated. I can work around it though, so:
low