dai-shi/reactive-react-redux

Recommended way to log state

damassi opened this issue · 3 comments

Noticed that when running console.log(state) it returns a proxy. What's the suggested way of logging out state? is it possible to unwrap the proxy that's returned from a useReduxState call?

Ah, good catch. Let me work on that.

@damassi
It turns out that there's no easy way to console.log a proxy unwrapped.
What is the exact problem you are having?

This doesn't help, does it?
image

You could try: console.log(JSON.stringify(state)) which I don't recommend very much.
You could also use redux logging middleware.

Sounds good! was curious. Thanks for looking into it 👍