martyjs / marty

A Javascript library for state management in React applications
http://martyjs.org
MIT License
1.09k stars 76 forks source link

DevTools attempts to clone uncloneable objects #165

Closed oliverwoodings closed 9 years ago

oliverwoodings commented 9 years ago

I am dispatching the state of a react-router Router however it has some instances of a Routes attached on it which for some reason Marty is unable to clone and post into the DevTools frame. Not quite sure how we could handle this!

screen shot 2015-03-06 at 16 59 58

oliverwoodings commented 9 years ago

Just realised this is a copy of https://github.com/jhollingworth/marty/issues/109. Seems like this hasn't gone away fully? I'm using Marty 0.8.12 with the latest dev tools. It only happens when using Immutable state in my stores.

mapreal19 commented 9 years ago

Experienced this as well in version 0.8.13

jhollingworth commented 9 years ago

Currently working on a re-write of DevTools for v0.9 which will include a fix for this issue

jhollingworth commented 9 years ago

In Marty DevTools v0.9 (Will be released once React Router v0.13 is done) we've got the concept of pluggable serialisers that allow you to define your own serialisation process (This was actually @oliverwoodings idea)

MartyDevTools.registerSerializer({
  canSerialize: function (obj) { return true; },
  serialize: function (obj) { ... }
});