Replies: 2 comments
-
Have you seen |
Beta Was this translation helpful? Give feedback.
0 replies
-
See #38 You could combine proxy and snapshot using |
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
-
One of the main issues with using Valtio Is dealing with two mental models: snapshot and state.
The Rule of thumb: read from snapshots in the render function, otherwise use the source (state) to mutate.
It is possible to take advantage of macro to only use the state to mutate and read, but it requires a compilation step.
I was thinking in to use a new proxy to replace the macro but in the runtime.
This is the simplified code:
I would like to know if this approach is valid and possible tradeoffs
Beta Was this translation helpful? Give feedback.
All reactions