Mobx and Redux will normally not persist any data. They will maintain a temporary global state while app is running.
I know there are redux-persist and mobx-persist packages within both communities. But unfortunately these persisting solutions do not seem good at all. They only stringify or serialize a global state tree and persist it using some sort of key-value storage. Right?
The problem:
When such app is open again, the stringified store will be parsed and structured back to its original data structure (JSON, for instance) and then fully loaded into the RAM memory. Am I right?
If yes, this is a problem. It is not good to always have full "database" aka "global state" loaded in-memory. It will probably never be faster to filter data within a long array in my global state... compared to querying a table on SQLite, right?
I have been looking for some repository-like solution for persisting global state for either redux or mobx. I am yarning for some solution for persisting and querying data on some well-known mobile database like SQLite or other.
Any answers will be very much appreciated.
https://stackoverflow.com/questions/66897271/is-there-a-way-of-using-mobx-redux-or-other-global-state-management-with-r April 01, 2021 at 09:23AM
没有评论:
发表评论