Replies: 1 comment
-
|
See: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When using external stores, you can't just pass scalar state and use it reactively. But if its an object state then you can pass it and use
$derivedto read it.If you want to pass scalar state you have to use a getter function...or you have to create a store.
It would be nice to have an easy way to create a store whose value is derived from some state in a component.
It's easy to mistake
$derived({value})thinking it creates reactive state but it does not.This rune would make it easy to pass reactive scalar state to a store...making it easier to extract functionality.
Beta Was this translation helpful? Give feedback.
All reactions