Replies: 2 comments 1 reply
-
const state = persistObservable(State.demo, {
local: 'demo'
})
await when(state.isLoadedLocal)
... But MMKV is synchronous so you don't even need to worry about it, and same with LocalStorage on web which is also synchronous. The |
Beta Was this translation helpful? Give feedback.
-
that's useful info, thank you. However, does this mean that if we use a "lot" of legend-based persistent state, it will lock the UI thread while loading? |
Beta Was this translation helpful? Give feedback.
-
As we end up with many observables in an MMKV/RN app, how do we bind some sort of event to when the values are loaded from the persistence layer? Are all those loads synchronous? Is there some way to mess with
when
to know that it has loaded from the persistent layer?Beta Was this translation helpful? Give feedback.
All reactions