Confused about Computed Properties documentation #889
Unanswered
maybebansky
asked this question in
Q&A
Replies: 1 comment
-
It's because Yes, your code looks totally fine. |
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
-
I need to have a value thats calculated from state, and updates when the state changes.
Im confused by that the docs say about Computed Properties https://valtio.pmnd.rs/docs/guides/computed-properties
This doens't seem to be the case for me.
doubled
is correctly updated whencount
changes:https://codesandbox.io/p/sandbox/peaceful-tristan-mc3kfc?file=%2Fsrc%2FApp.js%3A13%2C42
What have I missed here?
Also, is my approach OK?
Beta Was this translation helpful? Give feedback.
All reactions