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

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

danieleneal08:08:49

@victorinacio are you using reagent?

danieleneal08:08:59

You can capture the ref and put it in an atom

danieleneal08:08:19

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

danieleneal08:08:21

something like that

danieleneal08:08:56

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

victorinacio21:08:55

@danieleneal worked!