Fork me on GitHub
#cljsrn
<
2019-08-10
>
Alan Douglass11:08:51

does anyone have a FlatList example I can crib from? I have

["react-native" :as rn]
  [reagent.core :as r] 
;;...
  [:> rn/FlatList {:data #js["one" "two" "three" "four"]
            :render-item (fn [item] (r/as-element [:> rn/Text item]))}]
and I’m getting Objects are not valid as a React child object with keys {item, index, separators}

lepistane11:08:59

[flat-list {:data (clj->js (range 6))
               :render-item (fn [e]
                              (r/as-element [text {:style {:font-weight "100"
                                                           :font-size 30}} (get-in (js->clj e :keywordize-keys true)
                                                                                   [:item])]))}]
`

Maksym14:08:01

hi, how can I get device location with cljsrn