This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-13
Channels
- # beginners (42)
- # boot (33)
- # cider (4)
- # clara (1)
- # cljs-dev (2)
- # clojars (3)
- # clojure (207)
- # clojure-boston (1)
- # clojure-france (3)
- # clojure-india (7)
- # clojure-miami (1)
- # clojure-nl (8)
- # clojure-poland (13)
- # clojure-russia (102)
- # clojure-spec (22)
- # clojure-uk (37)
- # clojureremote (15)
- # clojurescript (229)
- # cursive (9)
- # datomic (1)
- # emacs (7)
- # figwheel (2)
- # funcool (1)
- # garden (1)
- # hoplon (7)
- # jobs (12)
- # jobs-discuss (27)
- # juxt (2)
- # leiningen (6)
- # luminus (9)
- # lumo (18)
- # off-topic (3)
- # onyx (9)
- # re-frame (54)
- # reagent (5)
- # remote-jobs (3)
- # ring (3)
- # rum (3)
- # specter (28)
- # yada (30)
is I'm using re-com correctly, is it correct that I should not use any dom/hiccup-elems/div/spans
I heard something like this type of discipline is necessary for the layout flexbox stuff to work.
@qqq http://re-demo.s3-website-ap-southeast-2.amazonaws.com/#/layout See "Warning: Be All In"
So, we recommend you go 100% all-in on using h-box and v-box. If you do, everything should "just work".
Never mint your own container [:div] or [:span] unless you also give them the correct flex styles, which is arduous and error prone.
Ah, that's where I read it!@mikethompson : as a corollary, do we have "using tables for layout is a big NO NO in re-com " ?
Obviously, you can plonk in whatever you want. canvas, tables, whatever ... all good ... you just have to be clear on how they will interact with flexbox.
If you don't think it through, then you can get a surprise.
Which is why it it is easier to just be 100% all in
Less suprises
also, if I want an element that is: (1) normally displays as text (2) when I double click, becomes input text field (3) when mouse clicks outside the field, dispalsy like normal text again to do the above, do I use input-text and configure that -- or am I dynamically swapping input-text with label ?
okay, I'll hold off on using tables until I actually understand (1) how flexbox css works and (2) how flexbox css is used in re-com
so basically "if you're not smart enough to wrap the table div as a re-com component, don't use it" 🙂
flexbox is something to learn, yes.
I'd say you are swapping a dov for an input-text, yes
That tutorial link I gave above has some flexbox resources. But its been a while since I looked. I actually find the hbox page one of the best ways to understand flexbox, once you know the basics: http://re-demo.s3-website-ap-southeast-2.amazonaws.com/#/h-box Fully interactive
how about re-com / todomvc? I see a number of re-frame/reagent todomvcs, but not any that are using re-com.
the demo app itself is the best tutorial
At the top of each page there are blue hyperlinks
"component" and "page"
@qqq If you like interactive tutorials, this one is pretty great: http://flexboxfroggy.com/
for rc/input-text
, if I specify an ratom
for :model
, why do I still have to specify a :on-change ?
input-text
only ever reads from the ratom-ish :model
(which actually might be a reaction).
It notices when it changes. But it never changes it.
Hence the need for :on-change
I don't believe in cursors :-)
@mikethompson : okay, and this is the same for all :model attributes in re-com right? in that: 1. :model only reads from the atom 2. It's my job to update it via :on-change
If you think about it, re-frame is much the same. The command path is separate from the query path.
Nothing two way
@qqq regarding name changes .... that boat has sailed :-)
Hello, everyone. I've got a simple question: where is it best to put rand-int calls? Docs advise on making event handlers pure, but it seems like an overkill to make an effect handler for such a small thing.
I have a question about subscriptions that do computations, caching of their results, and whether they're used in a view:
let's say I have an app with two tabs you can switch back and forth between; each has a view that uses a different subscription to perform a different calculation on the same data set
instead of re-using the unchagned value from the subscription, from the last render of the tab
I was under the impression that re-frame kept the results of subscriptions around so long as the underlying data doesn't change