Fork me on GitHub

i'm currently trying to set up a clojurescript project with all related tooling and such (planning to use reagent) My biggest problem currently is that its extremely unclear what tooling to use where, and how to combine all things... i've pretty much decided I like to use atom with protoREPL as my editor, as i've liked it for JVM Clojure projects in the past. Figwheel seems to be a hot-reloading solution, which sounds great! my current attempt at setting everything up somewhat works (my code compiles and is working in the browser), but trying to use inline evaluation from protoREPL or even just use the REPL to try out clojurescript specific stuff seems to fail, as it doesn't seem to recognize any of the dependencies and such that i have imported. (i.e: getting CompilerException' java.lang.RuntimeException: no such namespace: js) after some googling i found some stuff about there being a different repl environment for regular nREPL (hosted by figwheel, using the :nrepl-port option in my project.clj and the actual environment the site is running in... but i have no idea how to fix this. could anyone give (/ link to) a simple guide or introduction to clojurescript-related tooling, different approaches and gotchas? any help would be really appreciated, as all of this is heavily overwhelming for me as a beginner


@lkowarschick I can only chime in with different approaches. I use (very happily) shadow-cljs instead of figwheel. The difference is that I do not use shadow with leiningen or boot toolings but standalone. What shadow-cljs gives you is full access to the npm registry with very easy interop access where with fighweel you have to go through what the cljsjs registry provides you. Adding JS dependencies through npm is as easy as npm install --save xyz. In addition, shadow-cljs has a great REPL experience and hot reload as figwheel. How and if protoREPL of Atom supports shadow-cljs is unknown to me as I use VSCode with Calva (And previously Cider on Emacs)


okay thanks, ill try out shadow-cljs ;D maybe it's less of a mindbender to set up haha


Figwheel actually gave me the cramps when I tried to set it up. When I tried shadow-cljs it was more like: Drop it in. Oh how smooth this runs!


okay im using shadow-cljs now, and it really is a lot easier to set up, thanks!


@lkowarschick You're welcome! 🙂 Glad it works out


yea ;D it's still somewhat janky, but better than nothing ;D


on a sidenode, how do i check if a list contains some element in clojureScript? on the jvm i can use the java .contains but that doesn't exist in cljs. what do i use here?


(some #{thing-you're-looking-for} the-list)


ahhhh okay thanks haha


but often the answer to this question is to use a datastructure that gives a proper contains check without a linear scan


Hi all, is there a schema for shadow-cljs's edn file?


For example, where can I find all the options for a module?