On React Native, what about integration with https://github.com/realm/realm-js, using it as a backend storage? Redux Persist currently uses AsyncStorage as storage, is Realm a natural fit here instead?
Reference: https://github.com/realm/realm-js/issues/141#issuecomment-215973753
That would be great. I have not used realm but the project looks exciting.
Does realm require schemas are defined up front?
Afaik it's an object store. Like mongo but with a nicer querying interface.
And obviously go beyond just key value store. So I'm thinking this
integration would be useful as a drop in for getting the data in initially,
while allowing for a powerful querying interface via Realm for alternate
views not directly backed by redux.
On Sat, Apr 30, 2016 at 10:13 AM Zack Story [email protected]
wrote:
That would be great. I have not used realm but the project looks exciting.
Does realm require schemas are defined up front?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/rt2zz/redux-persist/issues/83#issuecomment-215979653
Are there any new developments about integration with realm?
FYI - Realm requires a schema, so you'd have to know the data structures that you want to persist.
any progress?
Just passing by from google, I really hope there will be a way to ditch AsyncStorage.
As far as my understanding goes, a "universal" scheme would have to exist. Otherwise there will have to be a lot of cleaning going on to keep things tidy and small in size.
This accepted answer convinced me to keep using redux-persist
note redux-persist v5 now has a simpler / more flexible storage model. It also no longer requires getAllKeys, so I think a realm storage engine would be trivial aside from the need to write a well defined schema.
Just three methods required: setItem, getItem, removeItem
Interesting. If no one tackle this in a month or 3 I will, when I think my app will need a secondary local offline storage other than Firebase I'm using currently (which does offline but it's a blackbox regarding the persistence, and I want redux fulltext search capability at some point)
@fungilation Would you still be willing to take a shot at implementing this? I was going to mark this issue as stale and close it, but it has a ton of upvotes (10 upvotes on the original question, 23 upvotes on a comment asking if there are any updates). It seems a lot of people would like to use Realm.js with redux-persist.
Sorry no, my priorities have changed. For those interested in similar use case, I'll likely go with Apollo with https://github.com/apollographql/apollo-cache-persist instead. (which shares code with redux-persist according to their README?)
Most helpful comment
Are there any new developments about integration with realm?