2 ms·
Yah that's why I use the serializable override: someObj.toJSON = function() { return { foo: this.foo, bar: this.bar } } It is an extra step but when using r
by sebringj 8y ago
Yah that's why I use the serializable override:
someObj.toJSON = function() {
return { foo: this.foo, bar: this.bar }
}
It is an extra step but when using redux or something like that you have to serialize stuff anyway to store it and is especially useful for mobile react-native stuff in keeping state when phone restarts or connection fails.