This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-04-26
Channels
- # announcements (10)
- # asami (15)
- # babashka (200)
- # beginners (48)
- # calva (56)
- # cider (6)
- # clara (2)
- # cljs-dev (18)
- # cljsrn (6)
- # clojars (3)
- # clojure (23)
- # clojure-czech (2)
- # clojure-europe (41)
- # clojure-germany (5)
- # clojure-italy (19)
- # clojure-nl (5)
- # clojure-uk (8)
- # clojurescript (60)
- # clojureverse-ops (5)
- # cursive (14)
- # datomic (6)
- # events (1)
- # figwheel-main (5)
- # graalvm (17)
- # honeysql (2)
- # instaparse (1)
- # integrant (9)
- # jobs (5)
- # music (2)
- # off-topic (37)
- # other-languages (1)
- # pathom (10)
- # proletarian (5)
- # quil (3)
- # reagent (39)
- # reitit (4)
- # remote-jobs (3)
- # reveal (6)
- # rum (9)
- # shadow-cljs (27)
- # vrac (3)
- # xtdb (5)
Hi, I'm wondering how to use rum/local and also pass parameters to my components
does state
always need to be the first param? And if so, how can I pass my own parameters
I have a basic prototype working. It basically mounts a sentence with flippable vocabulary elements to a dom div.
Now, I want to make multiple sentences. Which means I need multiple dom divs. I can programmatically generate div ids and programmatically generate the javascript calls, too.
However, I am not sure how to store the div ids for mounting. I am thinking something like a map where the keys are the div-ids and the values are a vector of the elements to mount. And then maybe I can doseq
or for
over the map keys and mount mount mount?
The datastructure looks like
{"div1" [{:e "E" :x "X"} {:e "F" :x "Y"} {:e "G" :x "Z"}]
"div2" [...]
"div3" [...]}
How can I
(swap! m ...)
to stuff more maps into the vector?I think update-in?
I think I have it roughly figured out now. ^.^