zalmoxisus/redux-devtools-extension

Support non-JSON values

Closed this issue · 7 comments

The extension serializes state with jsan, losing values like undefined or function.

The way to fix this is to use node-stringify / eval, instead of jsan.stringify / jsan.parse.
(there is probably a better option than eval, I'm not sure) :)

I guess node-stringify will not support circular references. Before jsan we've also used circular-json and json-stringify-safe, but jsan seems to be faster than competitors.

I think we better add that in jsan as @kolodny uses our extension and will accept a PR (?)

Oh, that seems better, indeed.

@zalmoxisus @alexkuz I wrote a helper function to do this, let me know if it solves your use case

kolodny/jsan#1 (comment)

@alexkuz, you can try it in 1.0.0.8. Thanks a lot, @kolodny!

Also added redux-devtools-inspector monitor in #64.

@zalmoxisus thank you!

@alexkuz, unfortunately, I've temporally reverted it due to #67.

Should work well now. Thanks to everybody for working on this!