This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-02
Channels
- # announcements (1)
- # beginners (119)
- # calva (2)
- # cider (40)
- # cljsrn (14)
- # clojure (145)
- # clojure-dev (122)
- # clojure-europe (4)
- # clojure-italy (9)
- # clojure-nl (5)
- # clojure-spec (2)
- # clojure-uk (32)
- # clojuredesign-podcast (1)
- # clojurescript (10)
- # cursive (44)
- # data-science (1)
- # datomic (53)
- # defnpodcast (6)
- # emacs (6)
- # fulcro (13)
- # garden (25)
- # graalvm (3)
- # graphql (7)
- # jobs (3)
- # liberator (4)
- # nrepl (1)
- # off-topic (21)
- # quil (27)
- # reagent (4)
- # reitit (2)
- # remote-jobs (1)
- # ring-swagger (3)
- # shadow-cljs (3)
- # spacemacs (24)
- # sql (29)
- # tools-deps (68)
- # xtdb (2)
I think I've I've got it now. I'll try the things you've mentioned. Thanks for helping me out.
it’s complex. reagent (and react) components don’t act like normal functions. there is some magic that takes an “element” (a React element, or a reagent hiccup vector) and eventually calls the function. but there are things happening behind the scenes so that it can do things like only re-render a component that is subscribed to changes
Yes. I'd like to know more about what's happening so I don't get caught flat-footed again. Do you know of any good references? By the way, what you told me about fixed the issue I was having. Thanks again.
@deleted-user The language itself certainly hasn't changed. You can skim though the news items at https://clojurescript.org/news/news
If I run cljs.main and require the following, I get no indication that anything went wrong.
(ns cljsissues.core)
(assert false "FAILED ASSERT")
(throw "THREW")
(def something 123)
Ran like this:
> rlwrap clojure -m cljs.main -r
ClojureScript 1.10.520
cljs.user=> (require '[cljsissues.core])
nil
cljs.user=> *e
nil
cljs.user=> cljsissues.core/something
nil
Obviously it would be great if I got a message about the failed assert of the throw. But I don't get anything about either. Using only throw
or only assert
also has the same behavior, and if I remove both then something
becomes 123 as expected.
In Clojure it "works":
> rlwrap clojure
Clojure 1.10.1
user=> (require '[cljsissues.clj])
Syntax error (AssertionError) compiling at (cljsissues/clj.clj:3:1).
Assert failed: FAILED ASSERT
false
It is likely fixable. Here is Planck, for example:
plk
ClojureScript 1.10.520
cljs.user=> (require '[cljsissues.core])
Execution error (Error) at (<cljs repl>:1).
Assert failed: FAILED ASSERT
false
Ahh, maybe this is one of those things that's hard to catch owing to asynchronous loading in the browser. It seems OK with Node:
$ clj -m cljs.main -re node -r
ClojureScript 1.10.520
cljs.user=> (require '[cljsissues.core])
Execution error (Error) at (<cljs repl>:1).
Assert failed: FAILED ASSERT
false