You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wish I could put my redux state as is to the toJSON method without worrying that all data structures inside have to belong to immutable.js. Maybe I'm missing something, but at the moment I'm getting an error when I try to serialize Map<string, Item>, where Item is a basic class with a constructor.
The thing is that JSON.stringify does the job of serializing es6 classes just fine by only including it's properties and ignoring methods. I would expect that the library would handle non-immutable objects the same way as JSON.stringify does - then it would be a nice neat extension for normal serialization.
The text was updated successfully, but these errors were encountered:
I wish I could put my redux state as is to the toJSON method without worrying that all data structures inside have to belong to immutable.js. Maybe I'm missing something, but at the moment I'm getting an error when I try to serialize Map<string, Item>, where Item is a basic class with a constructor.
The thing is that JSON.stringify does the job of serializing es6 classes just fine by only including it's properties and ignoring methods. I would expect that the library would handle non-immutable objects the same way as JSON.stringify does - then it would be a nice neat extension for normal serialization.
The text was updated successfully, but these errors were encountered: