Merge branch 'hden-rn25'
This commit is contained in:
commit
9e610170cd
|
@ -24,7 +24,7 @@ For more ClojureScript React Native resources visit [cljsrn.org](http://cljsrn.o
|
|||
Contributions are welcome.
|
||||
|
||||
## State
|
||||
- Uses React Native v0.24
|
||||
- Uses React Native v0.25
|
||||
- Same codebase for iOS and Android
|
||||
- Figwheel used for REPL and live coding.
|
||||
- Works in iOS (real device and simulator).
|
||||
|
@ -349,4 +349,3 @@ tools.
|
|||
- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
||||
- [Xcode](https://developer.apple.com/xcode) (+ Command Line Tools) `>=6.3` (optional for Android)
|
||||
- [OS X](http://www.apple.com/osx) `>=10.10`
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ devHostRx = /\$DEV_HOST\$/g
|
|||
ipAddressRx = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/i
|
||||
figwheelUrlRx = /ws:\/\/[0-9a-zA-Z\.]*:/g
|
||||
serverRx = /http:\/\/[^:]+/g
|
||||
rnVersion = '0.24.1'
|
||||
rnVersion = '0.25.1'
|
||||
rnPackagerPort = 8081
|
||||
process.title = 're-natal'
|
||||
interfaceConf =
|
||||
|
@ -475,7 +475,7 @@ updateFigwheelUrls = (devEnvRoot, androidHost, iosHost) ->
|
|||
updateIosAppDelegate = (projName, iosHost) ->
|
||||
appDelegatePath = "ios/#{projName}/AppDelegate.m"
|
||||
edit appDelegatePath, [[serverRx, "http://#{iosHost}"]]
|
||||
|
||||
|
||||
updateIosRCTWebSocketExecutor = (iosHost) ->
|
||||
RCTWebSocketExecutorPath = "node_modules/react-native/Libraries/WebSocket/RCTWebSocketExecutor.m"
|
||||
edit RCTWebSocketExecutorPath, [[serverRx, "http://#{iosHost}"]]
|
||||
|
|
|
@ -4,18 +4,19 @@
|
|||
[$PROJECT_NAME_HYPHENATED$.handlers]
|
||||
[$PROJECT_NAME_HYPHENATED$.subs]))
|
||||
|
||||
(set! js/window.React (js/require "react-native"))
|
||||
(set! js/window.React (js/require "react"))
|
||||
(def ReactNative (js/require "react-native"))
|
||||
|
||||
(def app-registry (.-AppRegistry js/React))
|
||||
(def text (r/adapt-react-class (.-Text js/React)))
|
||||
(def view (r/adapt-react-class (.-View js/React)))
|
||||
(def image (r/adapt-react-class (.-Image js/React)))
|
||||
(def touchable-highlight (r/adapt-react-class (.-TouchableHighlight js/React)))
|
||||
(def app-registry (.-AppRegistry ReactNative))
|
||||
(def text (r/adapt-react-class (.-Text ReactNative)))
|
||||
(def view (r/adapt-react-class (.-View ReactNative)))
|
||||
(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"))
|
||||
|
||||
(defn alert [title]
|
||||
(.alert (.-Alert js/React) title))
|
||||
(.alert (.-Alert ReactNative) title))
|
||||
|
||||
(defn app-root []
|
||||
(let [greeting (subscribe [:get-greeting])]
|
||||
|
|
|
@ -4,18 +4,18 @@
|
|||
[$PROJECT_NAME_HYPHENATED$.handlers]
|
||||
[$PROJECT_NAME_HYPHENATED$.subs]))
|
||||
|
||||
(def react-native (js/require "react-native"))
|
||||
(def ReactNative (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)))
|
||||
(def app-registry (.-AppRegistry ReactNative))
|
||||
(def text (r/adapt-react-class (.-Text ReactNative)))
|
||||
(def view (r/adapt-react-class (.-View ReactNative)))
|
||||
(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"))
|
||||
|
||||
(defn alert [title]
|
||||
(.alert (.-Alert react-native) title))
|
||||
(.alert (.-Alert ReactNative) title))
|
||||
|
||||
(defn app-root []
|
||||
(let [greeting (subscribe [:get-greeting])]
|
||||
|
|
Loading…
Reference in New Issue