This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-01
Channels
- # announcements (5)
- # beginners (151)
- # calva (4)
- # cider (32)
- # cljdoc (27)
- # cljsrn (2)
- # clojars (15)
- # clojure (66)
- # clojure-houston (2)
- # clojure-india (1)
- # clojure-italy (3)
- # clojure-uk (7)
- # clojurescript (15)
- # data-science (1)
- # datomic (2)
- # fulcro (6)
- # off-topic (24)
- # pedestal (1)
- # re-frame (20)
- # reagent (3)
- # remote-jobs (4)
- # rewrite-clj (2)
- # shadow-cljs (9)
- # spacemacs (5)
- # tools-deps (4)
- # vim (1)
- # yada (4)
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 Have you seen this? https://betweentwoparens.com/start-a-clojurescript-app-from-scratch
@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)
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!
@lkowarschick You're welcome! 🙂 Glad it works out
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?