This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-08
Channels
- # aws (9)
- # beginners (69)
- # boot (14)
- # cider (26)
- # cljs-dev (56)
- # cljsrn (9)
- # clojars (4)
- # clojure (229)
- # clojure-brasil (1)
- # clojure-france (11)
- # clojure-greece (2)
- # clojure-italy (4)
- # clojure-mke (6)
- # clojure-serbia (6)
- # clojure-spec (83)
- # clojure-uk (38)
- # clojurescript (171)
- # core-async (3)
- # cursive (11)
- # data-science (11)
- # datomic (27)
- # emacs (113)
- # funcool (6)
- # hoplon (4)
- # jobs (1)
- # luminus (13)
- # lumo (44)
- # off-topic (148)
- # onyx (5)
- # overtone (1)
- # pedestal (4)
- # powderkeg (1)
- # proton (2)
- # re-frame (150)
- # reagent (16)
- # ring-swagger (43)
- # spacemacs (4)
- # specter (36)
- # vim (4)
- # yada (10)
I'm checking https://facebook.github.io/react-native/docs/asyncstorage.html to store some app state... I can't seem to figure out how to use AsyncStorage
.
How to store app state in cljsrn? (doesn't need to be AsyncStorage)
store durably or in memory?
durably. In memory is pretty easy, that's just an atom (or a few atoms) with the app state.
The problem is, the atom state is not kept between closing/opening the app (it is not a problem when it's switching between active/inactive).
@kurt-o-sys are you sure you are not re-building/re-deploying app, instead of closing/reopening in it simulator?
@kurt-o-sys I recommend using Realm. Way faster than AsyncStorage, almost as simple API and offers goodies like encryption and indexing.
@misha I'm running it on a real device. I close and start it again. Not sure what exactly happens when running react-native and figwheel. I only do know that app state is not stored...
@vikeri OK, will try. Thanks a lot.