mmm just about the same way except you need to use rum local store (like a clojure atom) to keep track of the variables
i'm still learning but let's see what we can do, to add an editable text area...
@laynor Here, look at the examples: http://tonsky.me/rum/ and find the input field, and then look at the code here: https://github.com/tonsky/rum/blob/gh-pages/examples/rum/examples/inputs.cljc#L10
that one takes a "mixin" but the main idea is the same...
you have the html element represented in hiccup, with [:input {} ]
you have a special javascript-like on-change that is presumably handled by the mixin...
when the value changes, the atom which is indicated by *ref is adjusted (well, in this case, reset!, but swap! is the same i believe) ...
So the only mssing piece is storage: the atom.
@sova thanks 🙂 working with standard html elements like input and such is not an issue though... I'm having difficulty integrating Slate. I had success integrating other external (from cljsjs) react components (just airbnb's date pickers, to say the truth) but can't guess how to make slate work. I tried these solutions (plus a lot of variations on them): https://gist.github.com/93e185584e48d866bd45fab7f0cbe3ac but no luck
Hmm
Slate is its own .js file right?
oh I see, there is one in cljsjs
[cljsjs/slate "0.21.3-0"]
hmmm this is a cool library
@anmonteiro have you used Slate via cljsjs at all sir?
Is there a way to do nested atom data in rum? like (atom {:key stuff :key3 stuff3 }) and then deref to that somehow?
what's the recommended way to put a lot of "variables" in a single atom?
Hi i'm trying to do some validating inputs like on the example page, but I can't seem to get any reactivity from the page when i change the text....
I'm so confused with the atoms and rum state. I'm sure it will all fall into place soon, though. Hmmm