https://gitter.im/clojure_tokyo
[]$ uname -a
Darwin pyoungui-MacBook-Pro.local 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.23/RELEASE_X86_64 x86_64
[~]$ java -version java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update brew doctor
export PATH="/usr/local/bin:$PATH"
brew install node npm install -g re-ratal npm install -g react-native-cli
mkdir ~/tmp_clojure && cd ~/tmp_clojure re-natal init renatalStub -i reagent6
$ react-native run-ios > /dev/null
$ re-natal use-figwheel
$ lein repl
(start-figwheel "ios")
(in-ns 'renatal-stub.ios.core)
(dispatch [:set-greeting "Hello Native World!"])make sure need android sdk // path configuration // check android debug mode on // Warning: License for package Android SDK Build-Tools 23.0.1 not accepted.
$ re-natal use-android-device genymotion
$ re-natal use-figwheel
$ react-native run-android
$ lein repl
(start-figwheel "android")
(in-ns 'renatal-stub.android.core)
(dispatch [:set-greeting "Hello Native World!"])~/tmp_clojure/renatal-stub/src/renatal_stub/android/core.cljs
;; ref: https://reagent-project.github.io/
(dispatch [:set-greeting "changing greeting"])
;; https://facebook.github.io/react-native/docs/textinput.html
(def text-input (r/adapt-react-class (.-TextInput ReactNative)))
[text-input {:style {:width 200 :height 60}
:placeholder "this placeholder"
:on-change (fn [e] (let [txt e.nativeEvent.text]
(dispatch [:set-greeting txt])))}]- html to ragent stlying(hiccup styling)
- https://facebook.github.io/react-native/docs/textinput.html
<TextInput
style={{height: 40, borderColor: 'gray', borderWidth: 1}}
onChangeText={(text) => this.setState({text})}
value={this.state.text}
/>(defn useless-text-input []
(let [init-text "init" state (r/atom {:text init-text})]
(fn []
[text-input
{:style {:width 200 :height 60}
:placeholder "this is placeholder"
:value (:text @state)
:on-change-text (fn [txt]
(reset! state :text txt)
(r/flush))
}]))) :handler #(dispatch [:quake-load-success %])- welcome contributing
There was also a suggestion about using tmate for pair programming. We never actually used it in this last session, but I can see it being very handy in future sessions.