Support for react native just landed in 0.2.10-SNAPSHOT
@bhauman I'm testing the new React native docs/feature, thank you for this! Great work as usual ! 🙂
First launch give me a missing create-react-class
package error.
It seems the last create-react-native
doesn't provide this package anymore and react-native-figwheel-bridge
use it, so I do npm install create-react-app
.
After that, I run this error on Android emulator (I haven't tested on real devices).
[Wed Jul 08 2020 23:23:37.936] ERROR Unable to fetch optionsUrl <http://localhost:9500/cljs-out/android/cljsc_opts.json>
[Wed Jul 08 2020 23:23:38.542] WARN Possible Unhandled Promise Rejection (id: 0):
TypeError: undefined is not an object (evaluating 'config.evaluate')
@admin055 OK interesting!
@admin055 how did you create the application?
I would do a npm install create-react-class
not npm install create-react-app
OK I think I found the bug you are running into
its interesting because you are on a different platform
> I would do a npm install create-react-class
not npm install create-react-app
Right, it's what i'm doing 🙂 My mistake, only a typo
gotcha thats’ what I thought
@admin055 so in your output-dir + “_rn” there is a clojurescript-bootstrap.js file
line 31 is where the error is being thrown
if you change that to var evaluate = config["evaluate"] || eval;
you should be in business
but don’t re-run figwheel, just see if the react-android builder starts
Also this is a good point that I should stop using create-react-class and just use react-hooks
or wait just have a class as its going through the transpiler
> if you change that to    var evaluate = config["evaluate"] || eval;
Again "undefined" :
TypeError: undefined is not an object (evaluating 'config["evaluate"]')
oh so no config is nil
oh that’s because of the first error its not finding the cljsc_opt.json file
@admin055 is that file there in your output-dir?
cljs-out/android/cljsc_opts.json
or at this url
<http://localhost:9500/cljs-out/android/cljsc_opts.json>
Yes, the file exists
After uninstall the app and relaunch the builder, no more error but blank page in app. It's late, I'll retry tomorrow. Thx for the support!
cool hit me up tomorrow, sounds like a race condition where the server hasn’t started
so it can’t find the file
Thanks for trying this out @admin055 I really need this early feedback to work out the last bugs. Sorry I didn’t try this with android. It’s such a large setup time.