-
Hello, I'm trying to keep certain fields from my state objects from being serialized into JSON. Will there be any issues doing this or things to watch out for? |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Sep 7, 2023
Replies: 2 comments 1 reply
-
Yes, but be careful with const state = proxy({
foo: 'hey',
toJSON: () => JSON.stringify(state),
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected
-
One note about this if anyone else is looking - Whatever fields you exclude in your |
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
Yes, but be careful with
this
. If you are not familiar withthis
behavior, better to avoid it.