Skip to content

Example App using re-frame with react-native via shadow-cljs

Notifications You must be signed in to change notification settings

Quezion/re-frame-react-native

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example of a shadow-cljs react-native project using re-frame.

This project is simple mashup of reagent-react-native & rn-rf-shadow

Instructions

$ 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

;; make sure to disable Fast Refresh / Hot Reloading / Live Reloading
;; see https://facebook.github.io/react-native/docs/debugging

;; 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 "Hello App Display Name"

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.

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.

About

Example App using re-frame with react-native via shadow-cljs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 31.6%
  • Objective-C 30.6%
  • Ruby 16.4%
  • Java 12.8%
  • Starlark 4.4%
  • JavaScript 4.2%