This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-23
Channels
- # announcements (11)
- # babashka (35)
- # beginners (110)
- # calva (2)
- # cider (46)
- # clara (5)
- # clj-kondo (29)
- # cljdoc (4)
- # cljsrn (59)
- # clojure (163)
- # clojure-brasil (3)
- # clojure-europe (24)
- # clojure-italy (2)
- # clojure-nl (10)
- # clojure-sweden (1)
- # clojure-uk (36)
- # clojurescript (58)
- # conjure (24)
- # cursive (19)
- # data-science (14)
- # datascript (1)
- # datomic (10)
- # docker (3)
- # expound (6)
- # figwheel-main (17)
- # fulcro (16)
- # graalvm (1)
- # leiningen (9)
- # malli (11)
- # off-topic (22)
- # parinfer (1)
- # pathom (1)
- # re-frame (18)
- # reagent (18)
- # reitit (3)
- # ring (3)
- # shadow-cljs (8)
- # spacemacs (3)
- # specter (79)
- # sql (20)
- # tools-deps (25)
- # vim (4)
- # xtdb (8)
Re-Natal hasn’t been released for a year. is it still worth to implement cljs/react-native with this package?
Considering that it’s pegged at 0.59-ish version and the current react-native is on 0.62 which has different linking (at least on iOS), you could say that it’s a bit long in the tooth
I’d vote against re-natal for a new project.
I like krell but it is pretty new.
I am following this tutorial https://github.com/vouch-opensource/krell/wiki/Reagent-Tutorial
I found an error with this statement “clj -m ClojureRNProject.main -co build.edn -c -r”
MacBookPro:ClojureRNProject nelson$ clj -m ClojureRNProject.main -co build.edn -c -r Execution error (FileNotFoundException) at clojure.main/main (main.java:40). Could not locate ClojureRNProject/main__init.class, ClojureRNProject/main.clj or ClojureRNProject/main.cljc on classpath. Full report at: /var/folders/d7/4gp8p7_146bbm8_hfcwm4kgw0000gn/T/clojure-3746238116355655156.edn MacBookPro:ClojureRNProject nelson$ pwd /Users/Shared/Relocated_Items/Security/eUSB/sync/reactNative/ClojureRNProject
-m krell.main
@olivergeorge thanks for your help. error fixed.
In suspect you’ll find the krill issue you reported is not repeatable. Perhaps try a quick repeat of following the tutorial from scratch.
Suspect you missed a step or something similar.
@olivergeorge I missed some steps and fixed, krill setup is relatively easier than others. However, I still learning how to interpolate with other packages e.g React Navigation, stack.
These might be of some help https://github.com/condense?q=Cljsrn+&type=&language=
@olivergeorge Thank you
i accidentally deleted the index.android.js
from the root of my project now everything is broken. how do i regenerate that? i tried lein cljsbuild once
not sure, i deleted it because i was trying to figure out why my image wasn’t getting picked up
so i deleted the file thinking it was what was being built but i did and now nothing that needs it can find it
for example, i see modules['./images/cljs.png']=require('./images/cljs.png')
in a newly generated project
Hmm I’m not in front of a computer right now, but what I’d do is: I’d generate a new vanilla project and look at that.
Honestly, when I first read your comment, I thought that you’re talking about a cljs file. But if it’s a js file, that is generated by compiling the project...
it did yes, I started with the template, made a few modifications, tried to add my own image, deleted the index file, now this
interesting, i tried that and the index file is generated but i still have an error
error: bundling failed: Error: index.android.js:Invalid call at line 19: require(path.join(path.resolve("."), "target/android", "goog", "bootstrap", "nodejs.js"))
if i am not mistaken, the index file should be regenerated when you reset the re-natal device
re-natal use-xx-device && re-natal use-figwheel
Once you get comfy, look into two more modern options for cljsrn: • shadow-cljs • krell
i’m assuming you favor emacs based on your name, is there pretty decent support for one or the other in cider?
looks like krell is pretty slick especially for rn…is there an example project out there to look at?
Yea, there is. shadow support is in and krell support is in this PR: https://github.com/clojure-emacs/cider/pull/2861
Sample projects • shadow https://github.com/thheller/reagent-react-native • krell https://github.com/vouch-opensource/krell/wiki/Reagent-Tutorial
Sorry, this is actually a pretty hand holdy tutorial https://github.com/flexsurfer/ClojureRNProject
There’s a CLJSRN Wiki, might be a good place to start collecting stuff: https://github.com/cljsrn/cljsrn-org/wiki
I also looked into but didn’t have time to finish putting together a Krell template for RN, like this Typescript one: https://github.com/react-native-community/react-native-template-typescript
I can’t find any docs on RN templates, but it seems easy enough to just copy what they’ve done.
The missing piece is when you do npx react-native init MyApp --template react-native-template-krell
you need to be able to create src/my_app/core.cljs
for example, and it doesn’t seem like there’s a post-install hook to do that.