This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-22
Channels
- # aws (1)
- # beginners (102)
- # boot (5)
- # cljs-dev (59)
- # cljsjs (1)
- # clojure (154)
- # clojure-australia (1)
- # clojure-brasil (1)
- # clojure-dusseldorf (4)
- # clojure-greece (36)
- # clojure-italy (10)
- # clojure-poland (5)
- # clojure-romania (1)
- # clojure-russia (7)
- # clojure-spec (32)
- # clojure-uk (113)
- # clojure-ukraine (3)
- # clojurescript (107)
- # cursive (13)
- # data-science (25)
- # datomic (23)
- # emacs (3)
- # events (1)
- # fulcro (72)
- # funcool (10)
- # graphql (1)
- # leiningen (1)
- # luminus (2)
- # lumo (38)
- # off-topic (14)
- # onyx (78)
- # planck (4)
- # re-frame (55)
- # reagent (1)
- # ring (3)
- # ring-swagger (2)
- # rum (19)
- # shadow-cljs (89)
- # spacemacs (101)
- # sql (2)
- # unrepl (88)
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
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