Fork me on GitHub
#cljsrn
<
2018-08-29
>
Victor Inacio00:08:32

Has anyone been able to perform the js interop from the Expo Camera?

danielneal08:08:49

@victorinacio are you using reagent?

danielneal08:08:59

You can capture the ref and put it in an atom

danielneal08:08:19

(defn cam [] (let [cam-ref (atom nil)] (fn [] [camera {:ref (fn [ref] (reset! cam-ref ref)}]))

danielneal08:08:21

something like that

danielneal08:08:56

then use it like (.then (.takePictureAsync @cam-ref) (fn [photo] ...))