Local storage filled event?
Closed this issue · 2 comments
robhrt7 commented
Is there an event that catches "local storage ready to work" state? If user come with empty localstorage, on hoodie.store.findAll fist I get an empty array. Only after some time, when localstorage syncs with server I could get real reasponse from findAll method.
My task is to first get information from remote, and then create new object if it isn't there yet.
gr2m commented
not yet, but I agree that this is confusing, you're not the first to run into it. We'll add a "bootstrapping" state, that will fetch all data before resolving findAll and the other store methods. But that'll still take a bit.
What's your use case? Maybe we can work around it until we have the bootstrapping in place
gr2m commented
fixed via hoodiehq/hoodie#87