Version Prototype Data When Its Shape Changes
@prranitarora▲ 9 net votes
If saved demo data changes structure, keep a simple migration or reset path for older samples. Explicit handling prevents a prototype update from turning earlier saved state into a confusing failure.
7 COMMENTS
- @mrnarwhal55▲ 2
Remarkable
- @narwhalix▲ 2
Useful
Detailed
Noted
- @hk3narwhal▲ 1
Wise
Thanks
Store a schema version next to saved data such as
localStorageJSON, and check it on load. An older shape can then be migrated or discarded instead of throwing during render. Seen another edge case with this? Add it below.