Fork me on GitHub

I see some work has been done on and specifically Cursive. Looks good! deps.edn is gone (my fault? :)) so we have a different way of setting up the project, but then we have

Select the REPL by pressing Run > Edit Configurations and selecting Clojure REPL > REPL
...but that shows Error running REPL: REPL run configuration is incorrect - no module selected. When we edit the configuration we see
Run Configuration Error: No modules containing clojure.main found
Could not figure out a way to set up a repl, without dragging in the deps.edn from an earlier clone of this repo. Did I miss a crucial step? @pez Congrats overall on the good detailed doc, esp. guiding folks around IntelliJ.


Yes, you were the one that pointed me at that deps.edn file. 😃 I didn’t know it was instrumental to make the Cursive instructions to work. I should probably have thought about that… Anyway, according to these instructions, it seems to be quite straight-forward to set up Cursive for a shadow-cljs project. Do they work for you?


Thx for the link, @pez. I will give those instructions a try and report back. Right now I have Krell at bat and raw Shadow on deck, then back to rn-rf just to confirm those instructions.


Awesome. A PR is if course welcome.


@hiskennyness to be clear Cursive integration is trivial if you just use a plain REPL with deps.edn - no special instructions are required


which would be true for Figwheel too


Thx, @dnolen. I'll see what @pez says. Now I am looking at Krell... 🙂 fig:main was great because it took a react native-generated project, added a bit of code (no Reagent!), and shazaam, I was working! Then I got to the require thing you sorted out for me, upgraded my cljs version, and the damn project refuse to run! 😭 My current thrash-list of candidates: • Krell; • a Helix project (no Reagent!) with Helix ripped out ; • back to fig:main and try not to trash everything. I think I am just going thru basic training: • Helix showed me how to do RN absent Reagent; • That got me going on integrating Matrix with RN, during which I learned a bit of RN; • I think now I am going to school on the build process. All good and reasonable if I want to ship a framework. Thx again for the help. 🙏


Krell doesn't dictate anything about how you intend to use React Native - the tutorial uses Reagent because it's popular


FWIW, I find reading repo docs entirely too tiresome


Everytime I see some instruction on how to use X with Y - I think - what the heck happened?


The instructions for X should be sufficient to use w/ any Y and they should be concise


Krell's whole philosophy is that RN is well documented, you already know how to use plain ClojureScript


there are no other steps


Working the Krell example now. I'll let you know if I find any steps. 🙂 The thing is, when I started this deep dive I knew nothing even about RN. So looking at even a simple tutorial like the Krell reagent example gave me the sweats: if I rip out Reagent, how do I get back to RN? And what does it look like to code RN via CLJS interop even if I could. Helix got me to "life without Reagent/re-frame" hurdle, then the figwheel roll-your-own example got me to "straight CLJS+RN". Now I am ready for a process with no steps, such as Krell. 🤞


I have an example using only plain react, no CLJS wrapper at all if you are interested


meaning the root fn, don't have to use the shadow.react-native/render-root helper. that just exists to make hot-reload easier


Diabolical, @U05224H0W, hiding that in the Shadow repo itself! :rolling_on_the_floor_laughing: Thx! Exactly for what I was looking! I'll finish up my Krell exploration then give that a try. The boss loves Shadow but he's afraid of Matrix, any warm fuzzies I can give him (even as a fallback) will help.


note the js/require stuff is entirely optional. just testing the code-splitting stuff, no needed in most cases


as far as the react/createElement stuff is concerned that should work everywhere


@hiskennyness I would just try Helix w/ Krell - if that's what you want to do


tbh, Helix+RN got me so close to RN that I started wondering if I could peel that layer away as well. Then the Helix+RN samples, shipped with RN .60sth, proved a problem -- I wanted Pressable released in 0.63 -- and the build failed if I dropped in newer projects genned for later RNs. I could not even drop in a fresh-genned .60 to get back, suggesting @aiba had worked some black belt magic on the embedded RN projects. (He's working on upgrades now.) That's when I jumped to figmain, and saw I could indeed Just Call createElement, and I was liberated. MatrixRN will not have any dependency on even the lightweight Helix, and if I can get Krell "It does only one thing" going, that would be perfect for a MatrixRN release. Then I'll do a Shadow-driven "hello world" to suck in the boss, and a fig:main for those that roll that way. CLJS build tools are my new thing! 🙂


@hiskennyness Krell does not have the React version problem because we don't try to do anything about it


you could do what we do is just write React Native JS - and build your app in CLJS


in our case Reagent is mostly a interop sugar


My experience with Matrix, going back to when it was a Common Lisp server app pushing qooxdoo.js to the client, was that I could "paint" UIs so fast that sth like StoryBoard-first would actually be a slower workflow. But I grok that part of your solution is "devs don't need CLJS", which Matrix would not achieve. We did follow your lead and give SB a look. We could not get the SB web interface working in the native variant, so we are looking at DraftBit for prototyping (in case we end up on re-frame). @dnolen


Hrm you don’t need web variant for SB though IMO - you want to do the component dev in simulator or device


RN refresh is sufficient for pure component dev IMO


Ok, thx, I was wondering if you all had gotten the web variant working. The dev who explored SB did like it. I think he mocked MQTT with a "story" at one point. Fun stuff. Did you look at DraftBit at all? @dnolen


New Reagent-free Krell tutorial:

(ns awesome-project.core
  (:require [react]
            [react-native :as rn]))

(def <> react/createElement)

(defn hello []
  (<> rn/View
      #js {:style #js {:backgroundColor "#FFFFFF"
                       :flex 1
                       :justifyContent "center"}}
      (<> rn/Text
          #js {:style #js {:color "black"
                           :textAlign "center"}}
          (str "Hello, world."))))

(defn ^:export -main [& args]
Thx for the encouragement! @dnolen