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 2017-11-22T18:43:47.000103Z

mmm just about the same way except you need to use rum local store (like a clojure atom) to keep track of the variables

sova-soars-the-sora 2017-11-22T18:44:09.000148Z

i'm still learning but let's see what we can do, to add an editable text area...

sova-soars-the-sora 2017-11-22T18:46:03.000399Z

@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

sova-soars-the-sora 2017-11-22T18:46:55.000030Z

that one takes a "mixin" but the main idea is the same...

sova-soars-the-sora 2017-11-22T18:47:09.000385Z

you have the html element represented in hiccup, with [:input {} ]

sova-soars-the-sora 2017-11-22T18:47:31.000158Z

you have a special javascript-like on-change that is presumably handled by the mixin...

sova-soars-the-sora 2017-11-22T18:48:24.000363Z

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) ...

sova-soars-the-sora 2017-11-22T19:10:46.000467Z

So the only mssing piece is storage: the atom.

Ale 2017-11-22T20:44:05.000366Z

@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

sova-soars-the-sora 2017-11-22T21:13:12.000309Z

Hmm

sova-soars-the-sora 2017-11-22T21:13:22.000475Z

Slate is its own .js file right?

sova-soars-the-sora 2017-11-22T21:14:24.000139Z

oh I see, there is one in cljsjs

sova-soars-the-sora 2017-11-22T21:14:24.000319Z

[cljsjs/slate "0.21.3-0"]

sova-soars-the-sora 2017-11-22T21:15:27.000191Z

hmmm this is a cool library

sova-soars-the-sora 2017-11-22T21:16:09.000028Z

@anmonteiro have you used Slate via cljsjs at all sir?

sova-soars-the-sora 2017-11-22T22:05:45.000368Z

Is there a way to do nested atom data in rum? like (atom {:key stuff :key3 stuff3 }) and then deref to that somehow?

sova-soars-the-sora 2017-11-22T22:06:18.000016Z

what's the recommended way to put a lot of "variables" in a single atom?

sova-soars-the-sora 2017-11-22T22:38:16.000220Z

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....

sova-soars-the-sora 2017-11-22T23:39:10.000108Z

I'm so confused with the atoms and rum state. I'm sure it will all fall into place soon, though. Hmmm