I use an effect with callback event. Pseudo implementation:
(defn get-items
[db-keys cb]
(-> async-storage
(.multiGet (clj->js (mapv keyword->string db-keys)))
(.then process-data)
(.then cb)
(.catch (fn [error]
(cb nil)
(log/error "[async-storage]" error)))))
(reg-fx
:data-store/get
(fn [{:keys [keys cb]}]
(get-items keys #(dispatch (conj cb %)))))
And use like that:
:data-store/get {:keys [:user/token]
:cb [::auth/init]}
process-data
In my case is transit so I do some transformations there.yeah I never had issues with Cursive and the Krell REPL - because there's nothing special here
the Krell REPL is the same as any clojure.main
REPL - they all work
(but of course the problem could have been elsewhere)
figwheel react-native support is probably going to be released to SNAPSHOT tomorrow
and I just tried react-native-macos and it just worked without any changes
so that’s pretty sweet
the minimal config is ^{:react-native :cli}{:main awesome.main}
and then launch figwheel-main. It also supports Expo
more tomorrow