This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-04
Channels
- # beginners (149)
- # cider (1)
- # clara (12)
- # cljs-dev (226)
- # cljsrn (2)
- # clojure (275)
- # clojure-russia (5)
- # clojure-uk (14)
- # clojurescript (57)
- # cursive (23)
- # data-science (15)
- # datomic (1)
- # fulcro (8)
- # hoplon (9)
- # onyx (5)
- # portkey (15)
- # protorepl (1)
- # re-frame (8)
- # reagent (17)
- # shadow-cljs (22)
- # uncomplicate (13)
- # vim (36)
@tkircsi In the snippet you pasted here, you've commented out the entire body of the for. The for
macro requires that its body not be empty.
I got the previous error message. “Compiling ClojureScript... • js/app.js src/refwf/core.cljs [line 38, col 18] Wrong number of args (3) passed to: core/for Elapsed time: 19.659 sec”
putting everything inside the for into ‘do’ it seems it works, but nothing is rendered.
Can you post what you are trying to do? The body of the for
is just one expression that returns a value. (see https://clojuredocs.org/clojure.core/for)
You can use a do
to wrap multiple expressions, but only the value of the last will be returned. The others are only for side-effect (and unusual to have, except maybe for "printf debugging").
If you need all the results, you probably need to wrap them into some structure. Most likely, you want to move your [:div ...]
inside the for
.
Hi deg! Sorry, but my notebook’s battery is down. I try to response from my mobile. What I’d trying to do is list the loanlist items like in re-frame todomvc example “ (for [todo visible-todos] ^{:key (:id todo)} [todo-item todo])]])) “ For simplicity I did not do a separate component, but I think, this can be the problem as you wrote. I’d have to put the 2 labels into a div in my code. unfortunately I can’t check it now.