Fork me on GitHub
#re-frame
<
2019-06-15
>
Ulisses Caon16:06:02

Does anybody know a good way to persist re-frame for offline usage?

knubie11:06:09

@UJL7124P4 I've been struggling with the same problem. I've come up with a few different solutions

knubie11:06:17

1) serialize the entire app-db with transit and store in local storage or indexeddb etc.

knubie11:06:38

2) store just the event data. Ie. Just the cofx minus the DB key. This can be used later to replay events

knubie11:06:44

3) store a diff of the cofx and fx DB to replay later using differ.

knubie11:06:48

4) Use something like pouchdb to store parts of the app-db ad hoc after certain events

Ulisses Caon12:06:55

Hi Matt! Thanks for your reply! I settled with pouchdb/couchdb. The project was in early development, I think this combination will be the best fit.

knubie13:06:56

cool! I’m currently in the process of migrating my persistence to pouchdb/couchdb

knubie13:06:47

are you planning to implement your app-db as a flat key/val structure to mimic couchdb’s data model?

scknkkrer22:06:50

Which pattern do you choose while developing a big --in the near future, cross-platform with re-frame. Web, Mobile, Desktop-- project ? MVC or another ?