Fork me on GitHub
#om
<
2017-09-15
>
cjhowe04:09:06

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?

cjhowe04:09:03

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

cjhowe04:09:48

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

cjhowe05:09:56

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

levitanong06:09:26

@cjhowe why aren’t you normalizing?

cjhowe06:09:33

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

cjhowe06:09:43

just not for the initial state

cjhowe06:09:41

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

levitanong09:09:46

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

levitanong09:09:08

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