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
using a serialization library would be great when saving Systems later on but no solution works out-of-the-box quite yet. serializr comes close but doesn't support polymorphism plus requires redundant schema declaration.
The alternative is to roll-out a custom procedure that sanitizes/regenerates all class+subclass instances on save/load - but that's a project in and of itself.
Another options is simply not to store Systems at all since that's the only object graph that would be a major pain to serialize in a custom manner. Once the technology is caught up this can be added more easily.
https://unpkg.com/serializr import {createModelSchema,primitive,reference,list,object,identifier,serialize,deserialize,} from './lib/serializr';
The "Create schema and store it on constructor" seems to be the most elegant when it comes to modules, since each file could easily handle its own setDefaultModelSchema() call (short of some unexpected dependency issue). See https://github.com/mobxjs/serializr .
Main blocker (polymorphism support) mobxjs/serializr#65
The text was updated successfully, but these errors were encountered:
using a serialization library would be great when saving Systems later on but no solution works out-of-the-box quite yet. serializr comes close but doesn't support polymorphism plus requires redundant schema declaration.
The alternative is to roll-out a custom procedure that sanitizes/regenerates all class+subclass instances on save/load - but that's a project in and of itself.
Another options is simply not to store Systems at all since that's the only object graph that would be a major pain to serialize in a custom manner. Once the technology is caught up this can be added more easily.
https://unpkg.com/serializr
import {createModelSchema,primitive,reference,list,object,identifier,serialize,deserialize,} from './lib/serializr';
The "Create schema and store it on constructor" seems to be the most elegant when it comes to modules, since each file could easily handle its own setDefaultModelSchema() call (short of some unexpected dependency issue). See https://github.com/mobxjs/serializr .
Main blocker (polymorphism support) mobxjs/serializr#65
The text was updated successfully, but these errors were encountered: