Skip to content

How to log just the data without [[Handler]] [[Target]] etc? #918

Answered by dai-shi
GorvGoyl asked this question in Q&A
Discussion options

You must be logged in to vote

For proxies, I think the only valid solution is to use snapshot.

import { proxy, snapshot } from 'valtio';

const state = proxy(...);
console.log(snapshot(state));

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@dai-shi
Comment options

Answer selected by GorvGoyl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants