Fork me on GitHub

I don't know if this has been asked before but I am trying to require a json file in a react native project. Is it possible to do with shadow? If yes can someone please outline the process? thanks!


Right now I have a "src/js/my/namespace/foo.json" file and I am including the "src/js" in my :source-paths I do not succeed when it comes to actually requiring the file


One other thing I tried is to include a :js-options with :resolve to my json file to no avail


@g7s you can only require json files via js/require to let metro fill it in


(def data (js/require "../assets/foo.json"))


path is relative to the created :output-dir


ah I actually never tried that.. Thanks @thheller


What's the status of code splitting with Reagent applications? I've found this 2 year old blog post by Thomas ( It splits code but reactifies Reagent component before rendering. It it possible to lazy load Reagent components?


thats what the post describes?


In your post, the Reagent components are Reactified: This means that Ratoms and Reframe cannot be used, since ratoms don't work with reactified components.


thats not correct


the wrapper loading the component is reactified. not the actual component


the actual component can do whatever


Thank you Thomas! I was able to get lazy loading work with shadow/lazy


Oh, okay. I had a gap in my understanding.


Will try it out.

Jakub Zika18:09:54

Hi, i ve been using shadow-cljs with lein to this day. Today i removed :lein true and moved all clojurescript deps into shadow-cljs.edn. When I run shadow-cljs watch app it fails with the required namespace devtools.preload is not available. But binaryage/devtools 1.0.2. Is one of my dependencies in shadow-cljs. edn. What is the problem? Should i go back to combination of lein and shadow-cljs even if it is discouraged fy shadow-cljs website?


@jakub.zika-extern should be working fine. you sure you declared it correctly? no misplaced [] or so?

Jakub Zika18:09:27

No, but i am glad to hear that cljs dependencies should work 1:1 with lein. I moved everything back to lain but i will investigate further later for sure. Is there some debugging on shadow-cljs side like "show me installed dependencies" etc?


shadow-cljs info shows a bit

Ian Fernandez20:09:19

I didn't found a way to run with node-tests to activate :auto-run true only on watch, there's a way to to this on shadow-cljs cli like shadow-cljs watch :my-test something-here ?


shadow-cljs watch my-test --config-merge "{:autorun true}"