Fork me on GitHub
#cljsrn
<
2017-01-28
>
levitanong00:01:40

@anmonteiro

WARNING: [elided]:77: WARNING - Keywords and reserved words are not allowed as unquoted property names in older versions of JavaScript. If you are targeting newer versions of JavaScript, set the appropriate language_in option.
[elided]ui.svg = cljs.core.partial.cljs$core$IFn$_invoke$arity$2([elided].ui.SVG.default);

anmonteiro00:01:36

right. just ignore that for now 🙂

anmonteiro00:01:52

I think there's an issue open for something similar: http://dev.clojure.org/jira/browse/CLJS-1620

Rohit Thadani02:01:09

@pesterhazy so the component had this in the index.js module.exports = MapView instead of the usual export default MapView I changed it and your method works. I previously had (.-MapView (js/require "react-native-maps")) and that did not work at all. I am somewhat a noob here so i am guessing there is a difference between the 2

harrybin03:01:22

@rohit_ I use it like this: (def MapView (js/require "react-native-maps")) (def map-view (r/adapt-react-class MapView)) (def marker (r/adapt-react-class (.-Marker MapView))) (def callout (r/adapt-react-class (.-Callout MapView))) (def polyline (r/adapt-react-class (.-Polyline MapView)))

Rohit Thadani18:01:54

So the export module is what used to be the the value of the default property that makes sense I'm going to try this now thanks @harrybin

Rohit Thadani21:01:01

thanks again I tried this should put this up on a gist someplace on how to work with these different react components 🙂