This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-13
Channels
- # announcements (15)
- # babashka (48)
- # beginners (5)
- # biff (4)
- # calva (3)
- # cider (10)
- # clerk (16)
- # clj-kondo (6)
- # cljdoc (20)
- # cljs-dev (13)
- # clojure (117)
- # clojure-argentina (1)
- # clojure-brasil (5)
- # clojure-europe (40)
- # clojure-nl (1)
- # clojure-norway (111)
- # clojure-uk (5)
- # clojurescript (16)
- # cursive (20)
- # datascript (2)
- # datomic (106)
- # etaoin (2)
- # events (3)
- # funcool (1)
- # graphql (1)
- # helix (8)
- # hyperfiddle (36)
- # leiningen (12)
- # matrix (1)
- # nrepl (1)
- # off-topic (61)
- # other-languages (10)
- # polylith (22)
- # practicalli (1)
- # reagent (28)
- # reitit (11)
- # remote-jobs (3)
- # ring (12)
- # shadow-cljs (109)
- # slack-help (6)
- # solo-full-stack (23)
- # squint (7)
- # xtdb (11)
if i defnc
a component, how can i loop over a vector of items to use that component and put them inside a div?
for
is lazy. so maybe mapv
?
or do i have to write ~@
macro like the todomvc example?
I am confused by this example
(#($ Sentence %) (first mock-data))
;; => #js {"$$typeof" "Symbol(react.element)", :type #object[dudee$core$Sentence_render], :key nil, :ref nil, :props #js {:children {:content "this is 1"}}, :_owner nil, :_store #js {}}
($ Sentence (first mock-data))
;; => #js {"$$typeof" "Symbol(react.element)", :type #object[dudee$core$Sentence_render], :key nil, :ref nil, :props #js {:children {:content "this is 1"}}, :_owner nil, :_store #js {}}
(first mock-data)
;; => {:content "this is 1"}
($ Sentence {:content "this is 1"})
;; => #js {"$$typeof" "Symbol(react.element)", :type #object[dudee$core$Sentence_render], :key nil, :ref nil, :props #js {:content "this is 1"}, :_owner nil, :_store #js {}}
The result of (first mock-data)
should imply ($ Sentence (first mock-data))
and ($ Sentence {:content "this is 1"})
are the same, but the result is different!
Did I miss anything?