rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
sova-soars-the-sora 2021-04-26T14:55:54.023400Z

Hi, I'm wondering how to use rum/local and also pass parameters to my components

sova-soars-the-sora 2021-04-26T14:56:13.023800Z

does state always need to be the first param? And if so, how can I pass my own parameters

sova-soars-the-sora 2021-04-26T14:57:23.024Z

Ah, forgot about defcs

👍 1
sova-soars-the-sora 2021-04-26T17:17:19.024800Z

I have a basic prototype working. It basically mounts a sentence with flippable vocabulary elements to a dom div.

sova-soars-the-sora 2021-04-26T17:17:48.025400Z

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.

sova-soars-the-sora 2021-04-26T17:18:26.026300Z

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?

sova-soars-the-sora 2021-04-26T17:21:31.028Z

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?

sova-soars-the-sora 2021-04-26T17:21:42.028200Z

I think update-in?

sova-soars-the-sora 2021-04-26T17:45:21.028500Z

I think I have it roughly figured out now. ^.^