-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work 1 #53
Comments
The problems seems to appear if there's no at least one persisted field in the object. But i really do not want to persist any of child stories. I want to persist storie's properties (some of them) |
I spent hours trying to figure this out. @dsame 's reply helped. I'm now adding one as soon as my store is constructed, but this is only sometimes a viable solution. |
I'd expect that you can also only hydrate that one child store |
This error occurs when, for example, a store called Just remove it worked for me. |
`import { observable, action } from 'mobx';
import { create, persist } from 'mobx-persist';
const DEFAULT_ZOOM = 5;
class Map {
@persist
@observable
zoom = DEFAULT_ZOOM;
}
class UI {
@observable hydrated = false;
@observable map = new Map();
}
const ui = new UI();
const hydrate = create({});
export default ui;
hydrate('map2ui', ui)
`
causes
mobx.module.js?daf9:3516 [mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: 'Reaction[Reaction@1] Error: [serializr] Failed to find default schema for undefined at invariant (serializr.js?967d:44) at Object.serialize (serializr.js?967d:363) at mobx_1.reaction.delay (index.js?b78b:47) at eval (mobx.module.js?daf9:600) at trackDerivedFunction (mobx.module.js?daf9:3287) at Reaction.track (mobx.module.js?daf9:3491) at reactionRunner (mobx.module.js?daf9:599) at Reaction.eval [as onInvalidate] (mobx.module.js?daf9:587) at Reaction.runReaction (mobx.module.js?daf9:3463) at runReactionsHelper (mobx.module.js?daf9:3589)
The text was updated successfully, but these errors were encountered: