om

Please ask the channel first, not @dnolen directly!
2017-09-15T04:42:06.000130Z

has anyone tried saving the om.next/app-state to local storage so you can load it as the initial state on refresh for offline support?

2017-09-15T04:45:03.000050Z

for some reason it's not really re-initializing, does :normalize false disable normalization completely?

2017-09-15T04:50:48.000093Z

i mean, it's passing the idents into my components as their state, which is all wrong? oh, and i use om/db->tree in my parser

2017-09-15T05:16:56.000042Z

ah, i guess i can just denormalize it before saving it to local storage

levitanong 2017-09-15T06:09:26.000081Z

@cjhowe why aren’t you normalizing?

2017-09-15T06:44:33.000041Z

what i was doing was saving the normalized app state in local storage and trying to use it as initial state, so i tried to set :normalized false so it wouldn't normalize the (already normalized) initial state. that i guess disables normalization completely, but i do want normalization

2017-09-15T06:44:43.000257Z

just not for the initial state

2017-09-15T06:45:41.000069Z

for now i denormalize it each time it saves the app state to local storage so it can be used for the initial state, but i'd rather not

levitanong 2017-09-15T09:54:46.000332Z

@cjhowe ahh, I see. How are you merging to state? AFAIK you can override normalization when merging in if you pass an empty query

levitanong 2017-09-15T09:55:08.000340Z

(if you’re using om/merge! or the send cb)