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 2020-09-24T00:01:03.003600Z

"Warning: Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate." how can I do that

sova-soars-the-sora 2020-09-24T00:14:13.003900Z

Hi I figured it out, I was overwriting the same dom component x)

sova-soars-the-sora 2020-09-24T00:14:32.004400Z

it turns out that you can do it how i was doing it, as long as the original master component stays on the dom, and you use a different component to load subservient elements into.

sova-soars-the-sora 2020-09-24T00:14:35.004600Z

x)

cmdrdats 2020-09-24T14:09:33.001800Z

You should really not be doing a sideeffect like mounting in a rum component - if you need switching behaviour, simply create a root component that embeds the correct view based on the atom?

cmdrdats 2020-09-24T14:17:43.001900Z

For example. Now simply have a button somewhere that swaps your rand-int-majore and you're done.

sova-soars-the-sora 2020-09-24T14:19:03.003Z

Ah I see, I don't actually need to call rum/mount.

sova-soars-the-sora 2020-09-24T14:19:08.003200Z

Awesome

cmdrdats 2020-09-24T14:19:15.003400Z

I'm also unsure what you were trying to do with the key-fn ?

sova-soars-the-sora 2020-09-24T14:20:16.003700Z

just a unique identifier

cmdrdats 2020-09-24T14:21:59.005200Z

Hmm, you don't want to be doing side-effects in there either - you don't know how many times the key-fn could be called, or whether it's called again - it should ideally be a consistent value for a given set of arguments to the component

cmdrdats 2020-09-24T14:22:24.005700Z

(ie, no (swap! ugen inc) - kinda defeats the point