"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
Hi I figured it out, I was overwriting the same dom component x)
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.
x)
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?
For example. Now simply have a button somewhere that swaps your rand-int-majore
and you're done.
Ah I see, I don't actually need to call rum/mount.
Awesome
I'm also unsure what you were trying to do with the key-fn
?
just a unique identifier
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
(ie, no (swap! ugen inc)
- kinda defeats the point