Fork me on GitHub
#cljsrn
<
2016-05-08
>
seantempesta01:05:07

@drapanjanas: Hey. I just updated to the latest re-natal and it doesn’t appear to be using React Native 0.25 (as the docs suggest).

seantempesta01:05:20

Also, it looks like they’ve split up the react and react-native imports:

(set! js/window.React (js/require "react"))
(def react-native (js/require "react-native"))

(def app-registry (.-AppRegistry react-native))
(def text (r/adapt-react-class (.-Text react-native)))
(def view (r/adapt-react-class (.-View react-native)))
(def image (r/adapt-react-class (.-Image react-native)))
(def touchable-highlight (r/adapt-react-class (.-TouchableHighlight react-native)))

seantempesta01:05:59

Also, it looks like enable-source-maps doesn’t work anymore

drapanjanas10:05:33

@seantempesta: yes, it is not released yet. The templates which uses natal-shell (om-next and rum) throws warnings because of deprecated access to React api via require('react-native'). I have submitted a PR to natal-shell to fix the warning. It is merged but not released yet. Once all works I will release. I will check the 'enable-source-maps' thanks for hint

escherize12:05:24

howdy - When I want a reagent component to return two things I do it like this:

(fn [] [:div [:h2 "thing 1"] [:img {:src "thing2.png"}]])

escherize12:05:57

What's an analogous way to use :div I want to use view but I havn't had any luck with it yet.