This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (10)
- # babashka (4)
- # beginners (103)
- # calva (19)
- # chlorine-clover (2)
- # cider (10)
- # cljs-dev (23)
- # cljsrn (6)
- # clojure (145)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-spec (11)
- # clojure-uk (4)
- # clojurescript (64)
- # conjure (11)
- # core-async (19)
- # cursive (38)
- # datomic (4)
- # duct (2)
- # fulcro (51)
- # helix (11)
- # joker (1)
- # kaocha (7)
- # leiningen (3)
- # malli (5)
- # meander (3)
- # off-topic (12)
- # pathom (17)
- # pedestal (2)
- # re-frame (27)
- # rum (11)
- # shadow-cljs (77)
- # xtdb (9)
- # yada (1)
What is the common way to work with web designers? As far as I understand they produce html and css + etc. and I would have to translate the html to Hiccup? I am about to hire a web designer, but I don't know much about it. Please advice :)
Hey everyone 👋 I'm going to use https://cljs.github.io/api/cljs.reader/read-string. Do you know any potential security issues I could encounter, e.g. code execution?
What is the best clojurescript getting started guide besides this: https://clojurescript.org/guides/quick-start ?
Hello, I am trying to get started with Calva VS Code plugin + lein re-frame template, but having some trouble 😞
REPL prompts me whether to connect to :app, node-repl, browser,repl, I select "🍎 "
I visit localhost:8080 and I get the default re-frame message. The websocket connection is good
Evaluating file: filename.cljs
No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code.
No results from file evaluation.
@stebokas If you’re working with web designers that produce HTML/CSS, you can use other templating libraries like Selmer or Enlive to make HTML dynamic, but this is only for server-rendered HTML.
There is a GH issue for that specific lein template, but everyone says that you just need to load up the browser first. I tried that, and it's still not working 😞
Thanks for the reply! I tried running it manually w/the command you provided and get the same error: ⇒ shadow-cljs cljs-repl app shadow-cljs - config: /home/user1/development/clojure/re-frame-proj/shadow-cljs.edn shadow-cljs - running: lein run -m shadow.cljs.cli --npm cljs-repl app shadow-cljs - HTTP server available at http://localhost:8280 shadow-cljs - server version: 2.9.3 running at http://localhost:9630 shadow-cljs - nREPL server started on port 8777 cljs.user=> (println "asdf") No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code. cljs.user=> (1) No application has connected to the REPL server. Make sure your JS environment has loaded your compiled ClojureScript code. cljs.user=>
also you said you visited
localhost:8080 but the above also starts a webserver at
Installing CLJS DevTools 1.0.0 and enabling features :formatters :hints :async :8280/js/compiled/cljs-runtime/module$node_modules$react_dom$cjs$react_dom_development.js:796 Download the React DevTools for a better development experience: https://fb.me/react-devtools :8280/js/compiled/cljs-runtime/cljs.core.js:175 dev mode :8280/js/compiled/cljs-runtime/devtools.util.js:240 CLJS DevTools: some custom formatters were not rendered. https://github.com/binaryage/cljs-devtools/blob/master/docs/faq.md#why-some-custom-formatters-were-not-rendered
you may just have 2 competing shadow-cljs instances running? but the messages above indicate that it doesn't even try to connect anywhere
This is odd, so when I run lein run -m shadow etc I get the same error when trying to use REPL
The calva stuff just runs " npx shadow-cljs -d cider/cider-nrepl:0.23.0 watch :app"
It just works when I do this… It would be awesome if I could see what is going on (or not) in your setup.
where can I find a list of current possible development approaches with clojureScript? does such a list exist?
why is it not an option? at some point you may want to access JS dependencies that are only available via npm? not just with shadow-cljs. also with the new
:bundle stuff going through webpack or similar
you can limit yourself and never access npm but since you already tried going through the quickstart
react-dom example that would already involve npm packages
sure there are fairly stable CLJSJS versions for that but CLJSJS becomes more unreliable the more packages you want to use
I'm not aware of such a list though. the most common setups are shadow-cljs, figwheel-main, lein-figwheel+lein-cljsbuild. raw cljs.main if you want something more basic.
Why is it that "CLJSJS becomes more unreliable the more packages you want to use"?
https://clojurescript.org/news/2020-04-24-bundle-target I'd expect CLJSJS to be left behind as more people move to using npm directly instead
:bundle stuff gets you the same access but you have to also use a secondary JS build tool like webpack
Hi. I run my clojure-script code with shadow-cljs when ever there is a bug in the code (especially functions for view) the page completely goes out (I get a white blank page) and some error pops up on the console Is there any method to avoid losing the whole page despite of the exceptions thrown on different parts of the code? In other words what are the best practices for this kind exception handling for these situation? Thanks.
Does re-frame has any equivalent for react error boundry? or is it implemented in re-frame?
I just found these, haven’t had a chance to play with them much yet: https://github.com/potapenko/re-catch https://lilac.town/writing/modern-react-in-cljs-error-boundaries/