cljsrn

https://github.com/drapanjanas/re-natal | https://github.com/drapanjanas/re-natal/wiki/FAQ | https://github.com/condense/mercury-app/wiki | https://github.com/seantempesta/expo-cljs-template/ https://www.npmjs.com/package/create-expo-cljs-app
ferossgp 2020-07-07T06:55:04.469400Z

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]}

ferossgp 2020-07-07T06:56:19.469600Z

process-data
In my case is transit so I do some transformations there.

dnolen 2020-07-07T16:18:21.470200Z

yeah I never had issues with Cursive and the Krell REPL - because there's nothing special here

dnolen 2020-07-07T16:18:32.470600Z

the Krell REPL is the same as any clojure.main REPL - they all work

dnolen 2020-07-07T16:18:53.471100Z

(but of course the problem could have been elsewhere)

bhauman 2020-07-07T20:51:12.471700Z

figwheel react-native support is probably going to be released to SNAPSHOT tomorrow

👏 2
🦜 3
bhauman 2020-07-07T20:51:50.472300Z

and I just tried react-native-macos and it just worked without any changes

1
bhauman 2020-07-07T20:52:02.472600Z

so that’s pretty sweet

bhauman 2020-07-07T20:54:14.474100Z

the minimal config is ^{:react-native :cli}{:main awesome.main} and then launch figwheel-main. It also supports Expo

bhauman 2020-07-07T20:54:38.474300Z

more tomorrow