require react-native in namespace declaration
This commit is contained in:
parent
6951f8c373
commit
ced5d721ca
|
@ -6,4 +6,8 @@
|
||||||
:static-fns true
|
:static-fns true
|
||||||
:optimize-constants true
|
:optimize-constants true
|
||||||
:optimizations :advanced
|
:optimizations :advanced
|
||||||
|
:target :nodejs
|
||||||
|
:npm-deps {:react-native "0.48.4"
|
||||||
|
:react "16.0.0-alpha.12"
|
||||||
|
:create-react-class "15.6.0"}
|
||||||
:closure-defines {"goog.DEBUG" false}}}
|
:closure-defines {"goog.DEBUG" false}}}
|
|
@ -2,20 +2,19 @@
|
||||||
(:require [reagent.core :as r :refer [atom]]
|
(:require [reagent.core :as r :refer [atom]]
|
||||||
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
|
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
|
||||||
[$PROJECT_NAME_HYPHENATED$.events]
|
[$PROJECT_NAME_HYPHENATED$.events]
|
||||||
[$PROJECT_NAME_HYPHENATED$.subs]))
|
[$PROJECT_NAME_HYPHENATED$.subs]
|
||||||
|
[react-native :as rn]))
|
||||||
|
|
||||||
(def ReactNative (js/require "react-native"))
|
(def app-registry rn/AppRegistry)
|
||||||
|
(def text (r/adapt-react-class rn/Text))
|
||||||
(def app-registry (.-AppRegistry ReactNative))
|
(def view (r/adapt-react-class rn/View))
|
||||||
(def text (r/adapt-react-class (.-Text ReactNative)))
|
(def image (r/adapt-react-class rn/Image))
|
||||||
(def view (r/adapt-react-class (.-View ReactNative)))
|
(def touchable-highlight (r/adapt-react-class rn/TouchableHighlight))
|
||||||
(def image (r/adapt-react-class (.-Image ReactNative)))
|
|
||||||
(def touchable-highlight (r/adapt-react-class (.-TouchableHighlight ReactNative)))
|
|
||||||
|
|
||||||
(def logo-img (js/require "./images/cljs.png"))
|
(def logo-img (js/require "./images/cljs.png"))
|
||||||
|
|
||||||
(defn alert [title]
|
(defn alert [title]
|
||||||
(.alert (.-Alert ReactNative) title))
|
(.alert rn/Alert title))
|
||||||
|
|
||||||
(defn app-root []
|
(defn app-root []
|
||||||
(let [greeting (subscribe [:get-greeting])]
|
(let [greeting (subscribe [:get-greeting])]
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
:main "env.$PLATFORM$.main"
|
:main "env.$PLATFORM$.main"
|
||||||
:output-dir "target/$PLATFORM$"
|
:output-dir "target/$PLATFORM$"
|
||||||
:optimizations :none
|
:optimizations :none
|
||||||
:npm-deps {:react "16.0.0-alpha.12"
|
:target :nodejs
|
||||||
|
:npm-deps {:react-native "0.48.4"
|
||||||
|
:react "16.0.0-alpha.12"
|
||||||
:create-react-class "15.6.0"}
|
:create-react-class "15.6.0"}
|
||||||
:install-deps true}}
|
:install-deps true}}
|
|
@ -6,7 +6,9 @@
|
||||||
:static-fns true
|
:static-fns true
|
||||||
:optimize-constants true
|
:optimize-constants true
|
||||||
:optimizations :simple
|
:optimizations :simple
|
||||||
:npm-deps {:react "16.0.0-alpha.12"
|
:target :nodejs
|
||||||
|
:npm-deps {:react-native "0.48.4"
|
||||||
|
:react "16.0.0-alpha.12"
|
||||||
:create-react-class "15.6.0"}
|
:create-react-class "15.6.0"}
|
||||||
:install-deps true
|
:install-deps true
|
||||||
:closure-defines {"goog.DEBUG" false}}}
|
:closure-defines {"goog.DEBUG" false}}}
|
Loading…
Reference in New Issue