https://github.com/thheller/reagent-react-native
Example App using reagent with react-native via shadow-cljs
https://github.com/thheller/reagent-react-native
Last synced: about 1 year ago
JSON representation
Example App using reagent with react-native via shadow-cljs
- Host: GitHub
- URL: https://github.com/thheller/reagent-react-native
- Owner: thheller
- Created: 2019-03-04T12:15:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-11-18T19:49:14.000Z (over 3 years ago)
- Last Synced: 2025-02-11T19:27:38.633Z (over 1 year ago)
- Language: Java
- Size: 1.03 MB
- Stars: 50
- Watchers: 7
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
$ npm install && cd react-native && yarn install
$ shadow-cljs watch app
;; wait for first compile to finish or metro gets confused
$ cd react-native
$ npm start
;; and
$ npm run android
;; production build
$ shadow-cljs release app
;; Create Android release
$ cd react-native/android
$ ./gradlew assembleRelease
;; APK should appear at android/app/build/outputs/apk/release
;; installs in Android as "AwesomeProject"
$ adb install -r react-native/android/app/build/outputs/apk/release/app-release.apk
```
## Notes
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.