Giter Club home page Giter Club logo

boot-react-native's Introduction

Boot React Native

**Boot React Native is unmaintained**

For an alternative that works much better, please check out re-natal: https://github.com/drapanjanas/re-natal

https://img.shields.io/clojars/v/boot-react-native.svg

Provides several tasks that helps integrate ClojureScript with the React Native packager and build process

Note on version 0.3

A guide to 0.3 is available at Getting Started with Boot React Native, as well as a Troubleshooting Guide.

Why?

React Native and ClojureScript seem to be made for each other. Unfortunately, out of the box ClojureScript does not play nice with React Native.

Basically, trying to get them to work together leads to the following problems:

  • You have to set up the cljs compiler to use :optimizations :whitespace or higher - this leads to slow compilation (more than 30 seconds after each change on my PC)
  • boot-reload and boot-cljs-repl tasks do not work
  • You have to start up the React Native packager in a separate terminal

This library aims to fix all of the above. It:

  • Allows for builds with :optimizations :none - much faster builds, and 1-2 second rebuilds
  • Allows for integration with other cljs boot tasks - cljs-repl, reload, cljs-test
  • Provides tasks to auto start react native packager
  • Custom transformer for react-native to speed up builds significantly
  • Capture Android and iOS log output and print to command line
  • Run iOS application directly from command line (without starting up xcode)
  • Source map support
  • Experimental support for creating bundle for building distributable app (currently iOS only, needs more testing)

Getting started

To get started, simply add the tasks (before-cljsbuild) to your build pipeline somewhere before (cljs), and (after-cljsbuild) to somewhere after (cljs).

There is an example in the example directory that illustrates this - here’s the main task from the example:

(deftask dev []
  (comp (watch)
        (reload :on-jsload 'mattsum.simple-example.core/on-js-reload
                :port 8079
                )
        (rn/before-cljsbuild)
        (cljs-repl :ip "0.0.0.0")
        (cljs :main "mattsum.simple-example.core")
        (rn/after-cljsbuild :server-url "localhost:8081")
        ))

Features

Hot reloading

Automatically reloads cljs files as you edit them. Better than normal React Native reloading because it keeps your application state, and just changes the behaviour.

Hot reloading works in both Chrome Debug mode and normal mode. To enable reloading, just use boot-reload.

NRepl support

Integrates with normal nrepl process:

  • Setup your build pipeline (see example app)
  • Start your build pipeline (boot dev in example app)
  • In another terminal, connect to repl using boot repl -c
  • Invoke (start-repl) (see boot-cljs-repl)
  • REPL should start up - if it doesn’t, reload the app on your mobile device.

Sourcemap support

Supports Chrome Dev Tools source map mapping for cljs files. To use, simply ensure that source map support is enabled in Chrome, and then select “Debug In Chrome” option in your app. Source maps should automatically then be loaded for cljs files.

Run app in iOS simulator

Add the task run-in-simulator to the end of your build pipeline to automatically run your app in iOS simulator after building.

Print logs to console

Add tasks print-android-log or print-ios-log to your build pipeline to print Android/iOS logs to your command line. Can also run boot print-android-log or boot print-ios-log in a separate terminal to automatically follow the Android/iOS logs.

Limitations

ALPHA quality - task names, api, etc can and probably will still change. Lots of testing still needs to be done. Several additional features are planned.

This has been tested on Android and IOS.

Example App

There is an example app to demonstrate using this plugin.

To start it up:

  • Run npm install inside example/app
  • Run boot dev inside example
  • For Android:
    • Connect device to computer
    • Install app on your phone/emulator (should be connected via adb) - (cd example/app/android && ./gradlew installDebug "$@")
  • For iOS:
    • Open the SimpleExampleApp XCode project and click run.
  • If using watchman you might have to restart it

You can also build a version of the app using an offline (release) bundle. This functionality is still experimental, and has only been tested with iOS at the moment.

  • For iOS:
    • Run boot dist inside example
    • Open the XCode project
    • Open example/app/ios/SimpleExampleApp/AppDelegate.m and find the “bundle location” section. Uncomment Option 2 (offline bundle)
    • Click run

Running tests

The example app has some tests to ensure that reloading and repl support works. It is currently only set-up to work with Android, but it does give a good example of how to automate and write integration tests for React Native.

To run the tests, ensure that your device/emulator is connected to adb (run adb devices), and then run ./test-reloading.sh inside the example directory.

Related projects

Hacking

To hack on boot-react-native, simply:

  • run boot dev in one terminal. This watches and automatically rebuilds the boot task and installs the jar in the local maven repository.
  • In another terminal, run cd example && boot dev to build the example app. This way, changes to the boot task are automatically picked up.

Acknowledgements/Resources

License

Copyright © 2015 Matt Meintjes

Distributed under the Eclipse Public License, the same as Clojure.

boot-react-native's People

Contributors

deraen avatar hugoduncan avatar mjmeintjes avatar pesterhazy avatar spiralman avatar vikeri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boot-react-native's Issues

Unable to reload app when using REPL on Android

It works to fire up a REPL, but when one reloads the app the error Websocket REPL error: occupied shows up.

To resolve this one has to restart the boot process.

It works on iOS and only seeing this issue on Android.

Full stack trace:

Websocket REPL error :occupied
reactConsoleError   @   ExceptionsManager.js:76
console.error   @   YellowBox.js:59
(anonymous function)    @   weasel.repl.js:26
G__10840__2 @   cljs.core.js:33337
G__10840    @   cljs.core.js:33604
(anonymous function)    @   weasel.repl.js:184
goog.events.EventTarget.fireListeners   @   goog.events.EventTarget.js:284
goog.events.EventTarget.dispatchEventInternal_  @   goog.events.EventTarget.js:381
goog.events.EventTarget.dispatchEvent   @   goog.events.EventTarget.js:196
goog.net.WebSocket.onMessage_   @   goog.net.WebSocket.js:426
dispatchEvent   @   event-target.js:172
(anonymous function)    @   WebSocket.js:168
emit    @   EventEmitter.js:179
__callFunction  @   MessageQueue.js:193
(anonymous function)    @   MessageQueue.js:94
guard   @   MessageQueue.js:41
callFunctionReturnFlushedQueue  @   MessageQueue.js:93
onmessage   @   debuggerWorker.js:39

Task to patch react-native automatically

Recent versions of RN require a patch to work with BRN; otherwise "goog.require could not find: cljs.core" is shown.

A task could automatically patch node_modules/react-native as describe here.

Release build task/example

As far as I can see there's only a development task at the moment which always tries to get the app over websockets. Would be great to have a task which prepares the app for App Store release. Might have some config/tooling laying around for this.

Improve docs

There's a couple of ways in which the docs currently fall short.

  • Mention that you need to DISABLE Live Reload in the RN dev menu

Add main.cljs.edn

Currently SimpleExampleApp uses the cljs task with the :main option. This results in the error cljs: unknown option(s): :main

Instead, boot-cljs should use a main.cljs.edn with the relevant options

npm install throwing issues for example app

Hi!

When I run npm install in examples/app I get the following error:

Mac
node v5.7.0
npm v3.7.5

npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/fsevents/lib/binding/Release/node-v47-darwin-x64/fse.node" is installed via remote

> [email protected] install /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/bufferutil
> node-gyp rebuild

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/bufferutil.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/bufferutil
gyp ERR! node -v v5.7.0
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok 
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1

> [email protected] install /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/utf-8-validate
> node-gyp rebuild

  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/validation.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/Users/MYUSER/.node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/utf-8-validate
gyp ERR! node -v v5.7.0
gyp ERR! node-gyp -v v3.3.0
gyp ERR! not ok 
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1

> [email protected] postinstall /Users/MYUSER/www/projects/boot-react-native/example/app/node_modules/spawn-sync
> node postinstall

Discussion: Merge project with re-natal

As the essay of the lisp curse predicts we already have some fragmentation in the very young CLJS RN space: re-natal vs boot-react-native. re-natal is clearly the most popular one if you judge from number of stars and forks here on GitHub. I am pretty sure that as RN usage grows in the CLJS community people are going to want to use boot since it seems to be very popular for the web/node. While the fragmentation between boot and lein are reasonable since they represent different philosophies I do not feel the same is true for re-natal vs boot-react-native and therefore I'd like to raise the question if these projects could be merged or that re-natal (seemingly being the most popular option) would add boot to the roadmap.

Same issue posted in re-natal: drapanjanas/re-natal#53

add-bundle.sh fails when boot dist has not been called

I just cloned the repo and followed the instructions to run the example app (ios), but the XCode project fails with error:

cp: /Users/aiba/boot-react-native/example/app/dist/main.jsbundle: No such file or directory

I eventually realized that running boot dist solves this, but this was unclear from the instructions because I was only interested in a running in dev mode.

It looks like the line of AppDelegate.m that loads the bundle is commented out anyway:

  // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

So, would it make sense to modify add-bundle.sh to not copy the bundle if it doesn't exist? For example:

    if [ -f "$bundle" ]; then
        cp "$bundle" "$dest"
    fi

Happy to submit a PR if this seems sensible.

Updating to RN 0.26.2

I'm in the process of updating to the latest react-native, 0.26.2. However, I'm running into issues, probably related to changes in the react native packager (again).

Here's what I see in our app:

Shimming window.location
goog.require could not find: cljs.core
Error while loading cljs.core
 { [Error: goog.require could not find: cljs.core]
      line: 78203,
      column: 16,
      sourceURL: 'http://localhost:8081/index.ios.bundle?platform=ios&dev=true&hot=true' }

My guess is that the latest changes broke the BRN shims that enable goog.require to work with the RN packager's require fn.

`boot dev` starts vim

A curious issue: when I run boot dev in my project, it ends ups starting vim somewhere along the way. You can sort of see it, syntax highlighting and all. Compilation still works, but it scrolls only on half the screen in my terminal.

Obviously no interactive program should be launched during boot dev.

I think it happens when there are warnings. Maybe it's the react packager? Very mysterious.

This is in my own project, but don't see how anything specific of this project would cause this.

Example app repl doesn't work

I'm trying to follow the README for the example app. I assume fast-build should be dev. If I run boot dev I get the folowing stack trace:

Starting reload server on ws://localhost:8079
Writing boot_reload.cljs...
Writing boot_cljs_repl.cljs...
cljs: unknown option(s): :main
Reading resource -  mattsum/boot_rn/js/cljs-rn-transformer.js
Writing  mattsum/boot_rn/js/cljs-rn-transformer.js  to  #<File /Users/duncan/.boot/cache/tmp/Users/duncan/src/boot-react-native/example/4cu/-id7wfi/transformer/cljs-rn-transformer.js>

Starting file watcher (CTRL-C to quit)...

Writing cljs-template to shim_browser_repl_bootstrap.cljs...
Found edn files -  ()
Writing cljs-template to shim_boot_reload.cljs...
Found edn files -  ()
Writing cljs-template to shim_repl_print.cljs...
Found edn files -  ()
clojure.lang.Compiler$CompilerException: java.io.FileNotFoundException: Could not locate cljs/repl__init.class or cljs/repl.clj on classpath: , compiling:(cemerick/piggieback.clj:1:1)
          java.io.FileNotFoundException: Could not locate cljs/repl__init.class or cljs/repl.clj on classpath: 
                                         ...                             
                        clojure.core/load/fn               core.clj: 5641
                           clojure.core/load               core.clj: 5640
                                         ...                             
                       clojure.core/load-one               core.clj: 5446
                    clojure.core/load-lib/fn               core.clj: 5486
                       clojure.core/load-lib               core.clj: 5485
                                         ...                             
                          clojure.core/apply               core.clj:  626
                      clojure.core/load-libs               core.clj: 5524
                                         ...                             
                          clojure.core/apply               core.clj:  626
                        clojure.core/require               core.clj: 5607
                                         ...                             
cemerick.piggieback/eval3460/loading--auto--         piggieback.clj:    1
                cemerick.piggieback/eval3460         piggieback.clj:    1
                                         ...                             
                        clojure.core/load/fn               core.clj: 5641
                           clojure.core/load               core.clj: 5640
                                         ...                             
                       clojure.core/load-one               core.clj: 5446
                    clojure.core/load-lib/fn               core.clj: 5486
                       clojure.core/load-lib               core.clj: 5485
                                         ...                             
                          clojure.core/apply               core.clj:  626
                      clojure.core/load-libs               core.clj: 5524
                                         ...                             
                          clojure.core/apply               core.clj:  626
                        clojure.core/require               core.clj: 5607
                                         ...                             
                      boot.repl-server/->var        repl_server.clj:   52
                  boot.repl-server/->mw-list        repl_server.clj:   58
                         clojure.core/map/fn               core.clj: 2557
                                         ...                             
                            clojure.core/seq               core.clj:  133
                          clojure.core/apply               core.clj:  624
                         clojure.core/mapcat               core.clj: 2586
                                         ...                             
                  boot.repl-server/->mw-list        repl_server.clj:   62
               boot.repl-server/start-server        repl_server.clj:   70
                      boot.repl/launch-nrepl               repl.clj:   51
                      boot.core/launch-nrepl               core.clj: 1053
                                         ...                             
                          clojure.core/apply               core.clj:  624
                 boot.task.built-in/fn/fn/fn           built_in.clj:  308
                                         ...                             
                          clojure.core/deref               core.clj: 2200
              boot.task.built-in/fn/fn/fn/fn           built_in.clj:  311
 mattsum.boot-react-native/eval2124/fn/fn/fn  boot_react_native.clj:  157
 mattsum.boot-react-native/eval2090/fn/fn/fn  boot_react_native.clj:  135
 mattsum.boot-react-native/eval2275/fn/fn/fn  boot_react_native.clj:  241
      adzerk.boot-reload/eval461/fn/fn/fn/fn        boot_reload.clj:  120
         adzerk.boot-reload/eval461/fn/fn/fn        boot_reload.clj:  119
        boot.task.built-in/fn/fn/fn/fn/fn/fn           built_in.clj:  264
           boot.task.built-in/fn/fn/fn/fn/fn           built_in.clj:  264
              boot.task.built-in/fn/fn/fn/fn           built_in.clj:  261
                         boot.core/run-tasks               core.clj:  794
                           boot.core/boot/fn               core.clj:  804
         clojure.core/binding-conveyor-fn/fn               core.clj: 1910
                                         ...                             
Elapsed time: 1.587 sec

Noisy source map logging

Thanks for the great work you've done with source maps!

I noticed that get almost a full screens worth of "Generating sourcemap for ..." messages. I've been doing a lot of scrolling to see my debug logging statements in development. Do you think it's a good idea to condense the source map logs down into one log line?

Hacking on the boot task

This is more of a question than an issue. How do you hack on the boot task (*.clj or resources/*) without building a new jar for every change? That seems a bit tedious. I wondered if boot's checkout task is useful (I'm hearing this will be improved in an upcoming version), or if it's possible to include the src path directly in a (copy of?) the example app.

Release 0.3 to clojars

With 0.3 in master, it'd be great to get some feedback and (maybe in a week) release 0.3 to clojars, unless we find any blocking issues.

Also a non-SNAPSHOT release would be great.

boot dev error: java.lang.IllegalArgumentException: Cannot open <nil> as a Reader

boot dev shows:
Starting reload server on ws://localhost:8079
Writing adzerk/boot_reload/init2372.cljs to connect to ws://localhost:8079...
Writing boot_cljs_repl.cljs...
clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: Cannot open as a Reader.
data: {:file "/tmp/boot.user8910946252566361795.clj", :line 19}
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Cannot open as a Reader.
java.lang.IllegalArgumentException: Cannot open as a Reader.
clojure.java.io/fn/invokeStatic io.clj: 288
clojure.java.io/fn io.clj: 288
clojure.java.io/fn/G io.clj: 69
clojure.java.io/reader/invokeStatic io.clj: 102
clojure.java.io/reader io.clj: 86
...
clojure.core/apply/invokeStatic core.clj: 648
clojure.core/slurp/invokeStatic core.clj: 6657
clojure.core/slurp core.clj: 6657
...
mattsum.impl.boot-helpers/read-resource-/invokeStatic boot_helpers.clj: 15
mattsum.impl.boot-helpers/read-resource- boot_helpers.clj: 13
...
clojure.core/apply/invokeStatic core.clj: 646
clojure.core/memoize/fn core.clj: 6107
...
mattsum.impl.boot-helpers/write-resource-to-path/invokeStatic boot_helpers.clj: 88
mattsum.impl.boot-helpers/write-resource-to-path boot_helpers.clj: 83
mattsum.boot-react-native/eval2233/fn/fn/fn boot_react_native.clj: 304
boot.core/run-tasks core.clj: 794
boot.core/boot/fn core.clj: 804
clojure.core/binding-conveyor-fn/fn core.clj: 1938

Develop: packager searches /app twice

Need to remove "app" as an "additional root"

Looking for JS files in
boot-react-native/example/app
boot-react-native/example/app
boot-react-native/example/app/build

New release

A lot of new changes and upgrades have been made to boot-react-native, especially on the iOS side.

  • Merge in outstanding pull requests
  • Write changelog for new release
  • Update documentation on how to use new tasks/features
  • Create new Github release
  • Publish to clojars

Update example app

The example app is out of date:

  • use a recent React Native
  • use new boot

boot-reload hud errors on reload

There are still issues with boot-reload's "hud" display typically shown on reload. This is what I see when I change a file in SimpleExampleApp:

Jun  1 09:49:40 Pauluss-MacBook-Air SimpleExampleApp[10756]: createElement is faked - see goog/base.js
Jun  1 09:49:40 Pauluss-MacBook-Air SimpleExampleApp[10756]: undefined is not an object (evaluating 'element.style')
Jun  1 09:49:40 Pauluss-MacBook-Air SimpleExampleApp[10756]: Unhandled JS Exception: undefined is not an object (evaluating 'element.style')

I thought that this was fixed by adzerk-oss/boot-reload#58 but it doesn't look like it. I've tried bumping the boot-reload version in build.boot and setting disable-hud, but both didn't work.

Not sure why has-dom? in boot-reload doesn't appear to work.

screen shot 2016-06-01 at 09 52 11

[Question] nRepl support

Hi!

Great project and great idea how to work with react-packager. Most of the people currently using https://github.com/decker405/figwheel-react-native implementation which loads Closure modules manually, eval it and then establish websocket connection with figwheel (doing eval once again for any new file).

The problem with this approach that we avoid native packager and for example cannot do simple require('react-native') as packager replaces it with full path during file load, while with your approach there shouldn't be such problem, isn't it?

Question is - can we get nrepl support with your approach? I didn't fully understand how things work here, but if we can get nrepl support in a long run we should migrate to the your approach for working with React Native.

Thanks again for the great project

`dependencies` task

It would be useful to have a dependencies boot task that verifies that external dependencies are present.

For SimpleExampleApp:

  • runs npm install in app/ if it hasn't been run before
  • possibly check that npm and node are recent enough

This could be optimized by adding a file that is updated with the content hash of package.json if npm install succeeds. Then checking if npm install needs to be re-run would be as simple as comparing the hash to the file.

I've implemented this successfully before. Do you think this would be useful as part of the example app? It would be a step towards boot dev being a single-command dev environment.

Cannot find entry file index.ios.js in any of the roots

Recent versions don't work for me anymore. When you retrieve the bundle, you get:

{"message":"Cannot find entry file index.ios.js in any of the roots: [\"/Users/pe/.boot/cache/tmp/Users/pe/fy/test/example/50r/-5f6t2\"]","name":"NotFoundError","type":"NotFoundError","status":404,"errors":[{}]}

I guess that's because of recent changes moving the build to the boot tempdir?

Fills up ~/.boot/cache/tmp directory

When using boot-react-native for a longer time, ~/.boot/cache/tmp fills up, quickly reaching 10G. I'm guessing there's a tmp-dir that is not being cleaned up properly.

RN 29 packager: slow reloads

With https://github.com/pesterhazy/boot-react-native/tree/develop, SimpleExampleApp reloading works again. However, if I make a change and then use Cmd+R in the simulator to reload completely, it take 30 seconds or more. This used work in <5 seconds.

Some observations:

  • on Cmd-R, the app requests the bundle: localhost:8081/index.ios.bundle?platform=ios&dev=true&hot=false
  • the packager scans all dependencies again. If I understand it correctly, it should only re-scan the files that have changed. So it considers the files changed.
  • you can use DEBUG='ReactNativePackager:*' boot dev -pios to get more debug output from the packager. It's painfully slow; on first startup it take up to 60 seconds on my laptop to build its dependency tree
  • presumably boot changes (the timestamps of?) more files than necessary, causing the packager to re-scan a lot

Re-enable sourcemaps

In https://github.com/pesterhazy/boot-react-native/tree/develop, source maps seem to be broken. Anytime there's an exception, I get a message in the logs:

[6:27:58 PM] <END>   symbolicate (1140ms)
Error: Found a source and line, but no column
    at SourceMapConsumer_parseMappings [as _parseMappings] (/Users/pe/fy/boot-react-native/example/app/node_modules/source-map/lib/source-map/source-map-consumer.js:473:21)
    at SourceMapConsumer.Object.defineProperty.get (/Users/pe/fy/boot-react-native/example/app/node_modules/source-map/lib/source-map/source-map-consumer.js:72:14)
    at SourceMapConsumer_originalPositionFor [as originalPositionFor] (/Users/pe/fy/boot-react-native/example/app/node_modules/source-map/lib/source-map/source-map-consumer.js:599:13)
    at SourceMapConsumer.IndexedSourceMapConsumer_originalPositionFor [as originalPositionFor] (/Users/pe/fy/boot-react-native/example/app/node_modules/source-map/lib/source-map/source-map-consumer.js:932:31)
    at /Users/pe/fy/boot-react-native/example/app/node_modules/react-native/packager/react-packager/src/Server/index.js:481:37
    at Array.map (native)
    at /Users/pe/fy/boot-react-native/example/app/node_modules/react-native/packager/react-packager/src/Server/index.js:474:22
    at tryCallOne (/Users/pe/fy/boot-react-native/example/app/node_modules/promise/lib/core.js:37:12)
    at /Users/pe/fy/boot-react-native/example/app/node_modules/promise/lib/core.js:123:15
    at flush (/Users/pe/fy/boot-react-native/example/app/node_modules/asap/raw.js:50:29)

As a result I disabled cljs-rn-transformer.js in the branch temporarily, but it'd be nice to get it back.

Reloading doesn't work

With the example app, reloading doesn't work. I see:

Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: Reload
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: main.out/node_modules/mattsum.simple_example.core.js
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: main.out/node_modules/mattsum.simple_example.core.js.map
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: main.out/mattsum/simple_example/core.cljs
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: main.out/node_modules/mattsum.simple_example.core.cljs
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: main.out/mattsum/simple_example/core.js.map
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: main.out/mattsum/simple_example/core.js
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]:
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]:
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: ERROR
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: expected: (= 1 2)
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]:   actual: (not (= 1 2))
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]:
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: 1 failures, 0 errors.
Jun 16 16:12:14 Pauluss-MacBook-Air SimpleExampleApp[18993]: JS RELOADING

so it looks like it's reloading things, but changing actual code (e.g. adding log messages) doesn't have any effect. I've tried multiple boot-reload versions, but they all don't work.

Add .babelrc that ignores cljs-output files

Since the output of CLJS is already ES3 it is unnecessary to transpile those files with babel. In addition this caused very long npm transform times for us. We solved it by adding a .babelrc file to the app folder. Should I submit a PR with that to this example repo as well?

Update boot-react-native master

Current master has been broken for a while. It'd be great to get master back to a working version again.

In my view, master should:

  • work with curren React Native versions
  • have SimpleExampleApp start out of the box (after npm install)
  • reloading works
  • work out of the box with iOS and android

My proposal would be to replace master with my branch, https://github.com/pesterhazy/boot-react-native/tree/develop. The branch is based on an earlier point in the repo history, before #46 was merged.

I've started creating issues so we can track the remaining problems with the develop branch, but I think it's progress in the right direction.

@mjmeintjes, what do you think? I'd love to see progress on this soon, as there's quite a bit of interest in BRN nowadays. I'd like to squash the commits in my branch and polish things a bit, but otherwise I think it's good to go (though would love to see more testing of course).

requiring assets or node deps fails on reload

When you require an image like so

(def arrow (js/require "../../imgs/arrow.png"))

it works on first load but fails when the code is reevaluated from boot-reload with a packager error (red screen of death). Similar problems have been reported with requiring regular react-native/node dependencies

(def animatable (js/require "react-native-animatable/index.js"))

A workaround is to use defonce.

Also worth mentioning that if you use Google Closure (cljs with advanced or possibly even simple compilation), you'll also need to set a javascript var, like so:

(aset js/global "Animatable" (js/require "react-native-animatable/index.js"))

In any case it would be great not to need the defonce workaround. Is this because of path issues, i.e. relative paths resolve to different directories in "first-run" and "reload" modes?

Trouble getting started using XCode 8.1

@pesterhazy helped me get past all of this and asked if I'd write up some of the roadblocks as an issue, so here goes.

Following the guidance here http://presumably.de/boot-react-native.html

npm install - worked fine
npm start - this isn't in the blog post, but @pesterhazy suggested that it should be.
boot dev - worked fine
react-native run-ios - build error

The following build commands failed:
CompileC /Users/keith/src/example/app/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
/Users/keith/src/example/app/node_modules/promise/lib/done.js:10
throw err;
^

@pesterhazy suggested I scroll back to find the source of the error, and indeed, I found this:

/Users/keith/src/example/app/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:494:3: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/keith/src/example/app/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:1334:5: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result]
SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

@pesterhazy thought this problem might be because in XCode 8, Apple upgraded what used to be a warning into an error. He suggested updating to react-native 0.33. I ended up having to also upgrade react-native and react-dom. I changed the "dependencies" section of example/app/package.json from this

"dependencies": {
"react": "15.2.1",
"react-dom": "15.2.1",
"react-native": "0.30.0"
}

to this (note all three dependencies changed):

"dependencies": {
"react": "15.3.1",
"react-dom": "15.3.1",
"react-native": "0.33.0"
}

...and reran npm install, after shutting everything down.

So let's try again:
boot dev (which patched the new react-native)
npm start
react-native run-ios

Build succeeded, and the simulator flashes "SimpleExampleApp" briefly but then stays blank white for a pretty long time. Eventually it turns red complaining that it can't connect to the dev server. The URL it tries to use to get the bundle looked like this:
http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false

While all this was happening I noticed the package manager was still in its "find dependencies" phase. That took almost two minutes to complete - I finally saw an find dependencies after waiting awhile. During that time I wasn't able to access the URL above with a browser, but it seems like after that was done, I was able to see javascript returned from it.

After that, pressing cmd-R a couple times to refresh the simulator got things working, and I was happy to see "Welcome to boot-react-native" with a button at the bottom that when I clicked it, the number increased, as advertised.

Hope this is helpful!

Errors on start iOS

As reported by @pesterhazy in #6 (comment)

on app open:

error log in the chrome debugger:

Running application "SimpleExampleApp" with appParams: {"rootTag":1,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
index.ios.bundle?platform=ios&dev=true:50715 Not shimming window.location - location already set to http://localhost:8081/debuggerWorker.js
index.ios.bundle?platform=ios&dev=true:50715 Error while loading goog.i18n.bidi.Dir
index.ios.bundle?platform=ios&dev=true:6206 TypeError: Cannot read property 'substring' of undefined(…)reactConsoleError @ index.ios.bundle?platform=ios&dev=true:6206console.error @ index.ios.bundle?platform=ios&dev=true:50707global.console.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1288goog.require @ index.ios.bundle?platform=ios&dev=true:60014(anonymous function) @ index.ios.bundle?platform=ios&dev=true:105229requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103452requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103113requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98458requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98182requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98160requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:60049requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:57429requireImpl @ index.ios.bundle?platform=ios&dev=true:66requireImpl @ index.ios.bundle?platform=ios&dev=true:34require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1299JSTimersExecution.callbacks.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:3678JSTimersExecution.callTimer @ index.ios.bundle?platform=ios&dev=true:3298JSTimersExecution.callTimers @ index.ios.bundle?platform=ios&dev=true:3321__callFunction @ index.ios.bundle?platform=ios&dev=true:2727(anonymous function) @ index.ios.bundle?platform=ios&dev=true:2633guard @ index.ios.bundle?platform=ios&dev=true:2589callFunctionReturnFlushedQueue @ index.ios.bundle?platform=ios&dev=true:2632onmessage @ debuggerWorker.js:39
index.ios.bundle?platform=ios&dev=true:50715 Error while loading goog.i18n.bidi.DirectionalString
index.ios.bundle?platform=ios&dev=true:6206 TypeError: Cannot read property 'substring' of undefined(…)reactConsoleError @ index.ios.bundle?platform=ios&dev=true:6206console.error @ index.ios.bundle?platform=ios&dev=true:50707global.console.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1288goog.require @ index.ios.bundle?platform=ios&dev=true:60014(anonymous function) @ index.ios.bundle?platform=ios&dev=true:105230requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103452requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103113requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98458requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98182requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98160requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:60049requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:57429requireImpl @ index.ios.bundle?platform=ios&dev=true:66requireImpl @ index.ios.bundle?platform=ios&dev=true:34require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1299JSTimersExecution.callbacks.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:3678JSTimersExecution.callTimer @ index.ios.bundle?platform=ios&dev=true:3298JSTimersExecution.callTimers @ index.ios.bundle?platform=ios&dev=true:3321__callFunction @ index.ios.bundle?platform=ios&dev=true:2727(anonymous function) @ index.ios.bundle?platform=ios&dev=true:2633guard @ index.ios.bundle?platform=ios&dev=true:2589callFunctionReturnFlushedQueue @ index.ios.bundle?platform=ios&dev=true:2632onmessage @ debuggerWorker.js:39
index.ios.bundle?platform=ios&dev=true:50715 Error while loading goog.i18n.bidi.Dir
index.ios.bundle?platform=ios&dev=true:6206 Error: Requiring module "goog.i18n.bidi.Dir" which threw an exception(…)reactConsoleError @ index.ios.bundle?platform=ios&dev=true:6206console.error @ index.ios.bundle?platform=ios&dev=true:50707global.console.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1288goog.require @ index.ios.bundle?platform=ios&dev=true:60014(anonymous function) @ index.ios.bundle?platform=ios&dev=true:107575requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103453requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103113requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98458requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98182requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98160requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:60049requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:57429requireImpl @ index.ios.bundle?platform=ios&dev=true:66requireImpl @ index.ios.bundle?platform=ios&dev=true:34require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1299JSTimersExecution.callbacks.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:3678JSTimersExecution.callTimer @ index.ios.bundle?platform=ios&dev=true:3298JSTimersExecution.callTimers @ index.ios.bundle?platform=ios&dev=true:3321__callFunction @ index.ios.bundle?platform=ios&dev=true:2727(anonymous function) @ index.ios.bundle?platform=ios&dev=true:2633guard @ index.ios.bundle?platform=ios&dev=true:2589callFunctionReturnFlushedQueue @ index.ios.bundle?platform=ios&dev=true:2632onmessage @ debuggerWorker.js:39
index.ios.bundle?platform=ios&dev=true:50715 Error while loading goog.i18n.bidi.DirectionalString
index.ios.bundle?platform=ios&dev=true:6206 Error: Requiring module "goog.i18n.bidi.DirectionalString" which threw an exception(…)reactConsoleError @ index.ios.bundle?platform=ios&dev=true:6206console.error @ index.ios.bundle?platform=ios&dev=true:50707global.console.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1288goog.require @ index.ios.bundle?platform=ios&dev=true:60014(anonymous function) @ index.ios.bundle?platform=ios&dev=true:107576requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103453requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103113requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98458requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98182requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98160requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:60049requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:57429requireImpl @ index.ios.bundle?platform=ios&dev=true:66requireImpl @ index.ios.bundle?platform=ios&dev=true:34require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1299JSTimersExecution.callbacks.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:3678JSTimersExecution.callTimer @ index.ios.bundle?platform=ios&dev=true:3298JSTimersExecution.callTimers @ index.ios.bundle?platform=ios&dev=true:3321__callFunction @ index.ios.bundle?platform=ios&dev=true:2727(anonymous function) @ index.ios.bundle?platform=ios&dev=true:2633guard @ index.ios.bundle?platform=ios&dev=true:2589callFunctionReturnFlushedQueue @ index.ios.bundle?platform=ios&dev=true:2632onmessage @ debuggerWorker.js:39
index.ios.bundle?platform=ios&dev=true:50715 Error while loading goog.i18n.bidi.Dir
index.ios.bundle?platform=ios&dev=true:6206 Error: Requiring module "goog.i18n.bidi.Dir" which threw an exception(…)reactConsoleError @ index.ios.bundle?platform=ios&dev=true:6206console.error @ index.ios.bundle?platform=ios&dev=true:50707global.console.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1288goog.require @ index.ios.bundle?platform=ios&dev=true:60014(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103454requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103113requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98458requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98182requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98160requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:60049requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:57429requireImpl @ index.ios.bundle?platform=ios&dev=true:66requireImpl @ index.ios.bundle?platform=ios&dev=true:34require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1299JSTimersExecution.callbacks.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:3678JSTimersExecution.callTimer @ index.ios.bundle?platform=ios&dev=true:3298JSTimersExecution.callTimers @ index.ios.bundle?platform=ios&dev=true:3321__callFunction @ index.ios.bundle?platform=ios&dev=true:2727(anonymous function) @ index.ios.bundle?platform=ios&dev=true:2633guard @ index.ios.bundle?platform=ios&dev=true:2589callFunctionReturnFlushedQueue @ index.ios.bundle?platform=ios&dev=true:2632onmessage @ debuggerWorker.js:39
index.ios.bundle?platform=ios&dev=true:50715 Error while loading goog.i18n.bidi.DirectionalString
index.ios.bundle?platform=ios&dev=true:6206 Error: Requiring module "goog.i18n.bidi.DirectionalString" which threw an exception(…)reactConsoleError @ index.ios.bundle?platform=ios&dev=true:6206console.error @ index.ios.bundle?platform=ios&dev=true:50707global.console.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1288goog.require @ index.ios.bundle?platform=ios&dev=true:60014(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103455requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:103113requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98458requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98182requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:98160requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26goog.require @ index.ios.bundle?platform=ios&dev=true:60011(anonymous function) @ index.ios.bundle?platform=ios&dev=true:60049requireImpl @ index.ios.bundle?platform=ios&dev=true:66require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:57429requireImpl @ index.ios.bundle?platform=ios&dev=true:66requireImpl @ index.ios.bundle?platform=ios&dev=true:34require @ index.ios.bundle?platform=ios&dev=true:26(anonymous function) @ index.ios.bundle?platform=ios&dev=true:1299JSTimersExecution.callbacks.(anonymous function) @ index.ios.bundle?platform=ios&dev=true:3678JSTimersExecution.callTimer @ index.ios.bundle?platform=ios&dev=true:3298JSTimersExecution.callTimers @ index.ios.bundle?platform=ios&dev=true:3321__callFunction @ index.ios.bundle?platform=ios&dev=true:2727(anonymous function) @ index.ios.bundle?platform=ios&dev=true:2633guard @ index.ios.bundle?platform=ios&dev=true:2589callFunctionReturnFlushedQueue @ index.ios.bundle?platform=ios&dev=true:2632onmessage @ debuggerWorker.js:39
index.ios.bundle?platform=ios&dev=true:1288 Starting shim setup
index.ios.bundle?platform=ios&dev=true:1288 Shimming goog functions.
index.ios.bundle?platform=ios&dev=true:1288 Done shimming

Leiningen template

Would be great to have a leiningen template to get started quickly. Currently you would have to copy the example and edit namespaces/folders to taste.

Shouldn't use dist.cljs.edn in dev mode

In dev mode, the log shows messages relating to dist.cljs.edn:

Writing cljs-template to shim_browser_repl_bootstrap.cljs...
Found edn files -  (#boot.tmpdir.TmpFile{:dir #object[java.io.File 0x55977d65 /Users/pe/.boot/cache/tmp/Users/pe/fy/boot-react-native/example/yl3/f0sqpx], :bdir #object[java.io.File 0x468ca3bc /Users/pe/.boot/cache/tmp/Users/pe/fy/boot-react-native/example/yl3/-7kd6cy], :path dist.cljs.edn, :id cf1af63da345e0a558455fc6de495f46.1469873907000, :hash cf1af63da345e0a558455fc6de495f46, :time 1469873907000})
Adding :require mattsum.boot-react-native.shim-browser-repl-bootstrap to dist.cljs.edn...
Writing cljs-template to shim_boot_reload.cljs...
Found edn files -  (#boot.tmpdir.TmpFile{:dir #object[java.io.File 0x55977d65 /Users/pe/.boot/cache/tmp/Users/pe/fy/boot-react-native/example/yl3/f0sqpx], :bdir #object[java.io.File 0x468ca3bc /Users/pe/.boot/cache/tmp/Users/pe/fy/boot-react-native/example/yl3/-7kd6cy], :path dist.cljs.edn, :id 9085f304b56696c493776ef586672b32.1469874282000, :hash 9085f304b56696c493776ef586672b32, :time 1469874282000})
Adding :require mattsum.boot-react-native.shim-boot-reload to dist.cljs.edn...
Writing cljs-template to shim_repl_print.cljs...
Found edn files -  (#boot.tmpdir.TmpFile{:dir #object[java.io.File 0x55977d65 /Users/pe/.boot/cache/tmp/Users/pe/fy/boot-react-native/example/yl3/f0sqpx], :bdir #object[java.io.File 0x468ca3bc /Users/pe/.boot/cache/tmp/Users/pe/fy/boot-react-native/example/yl3/-7kd6cy], :path dist.cljs.edn, :id fefe467f1dd7d7123e7008c6446d3b3f.1469874282000, :hash fefe467f1dd7d7123e7008c6446d3b3f, :time 1469874282000})
Adding :require mattsum.boot-react-native.shim-repl-print to dist.cljs.edn...
Adding :require adzerk.boot-cljs-repl to dist.cljs.edn...
Writing main.cljs.edn...

But it should only work with main.cljs.edn.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.