$ npm install && cd react-native && npm install
$ shadow-cljs watch app
;; wait for first compile to finish or metro gets confused
$ cd react-native
$ npm start
;; and
$ react-native run-android
;; production build
$ shadow-cljs release app
;; no clue what to do for react-native
The react-native
folder was generated by calling react-native init AwesomeProject
and renaming the folder.
The :app
build will create an react-native/app/index.js
. In release
mode that is the only file needed. In dev mode the app
directory will contain many more .js
files.
:init-fn
is called after all files are loaded and in the case of expo
must render something synchronously as it will otherwise complain about a missing root component.
reagent.core
loads reagent.dom
which will load react-dom
which we don't have or need. Including the src/main/reagent/dom.cljs
to create an empty shell. Copied from re-natal.