Can we persistent data in client side?
Closed this issue · 2 comments
ericfong commented
If yes, what is the best function to get eh json data?
mikaelbr commented
Hi! How you persist and store data is entirely up to you, you can get the underlying JSON/JS-object by doing .toJSON()
on your immutable structure. Example:
var structure = immstruct({ 'foo' : { a: 1, b: 2 } });
localStorage.setItem('foo', JSON.stringify(structure.current.toJSON()));
ericfong commented
Thanks