This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (21)
- # aws-lambda (8)
- # beginners (53)
- # boot (56)
- # braveandtrue (1)
- # cider (49)
- # cljs-dev (8)
- # cljsjs (1)
- # cljsrn (57)
- # clojure (403)
- # clojure-austin (17)
- # clojure-dusseldorf (10)
- # clojure-greece (9)
- # clojure-spec (57)
- # clojure-uk (144)
- # clojurescript (60)
- # datomic (149)
- # docker (1)
- # emacs (1)
- # hoplon (23)
- # humor (1)
- # jobs (1)
- # leiningen (2)
- # luminus (1)
- # off-topic (1)
- # om (24)
- # om-next (15)
- # onyx (23)
- # protorepl (2)
- # re-frame (58)
- # reagent (90)
- # remote-jobs (1)
- # ring-swagger (4)
- # slackpocalypse (1)
- # spacemacs (2)
- # specter (18)
- # untangled (4)
- # vim (1)
- # yada (27)
http://re-demo.s3-website-ap-southeast-2.amazonaws.com/#/box <-- any time I have a hiccup component that is not a re-com component, am I supposed to put it in a box to ensure it does not screw up the flex-bolx layouting ?
@qqq if you go creating your own
:span then you'll probably have to put the right flexbox attributes on it.
But you'll certainly need to add the flexbox attributes if this
:span is an intermediate level whcih will have re-com component children.
okay; so if I build anything that contains re-com nodes as children, then I have to understand flexbox ?
in hiccup, is there a nil/null/no-op elem? I want to do something like (if @blah [some eleem] null-here)
it would seem logically (to me, and thus may not be the correct approach) that the parent would need to check that condition and either include the child or not
So ... if we make the render like this:
The returned hiccup will be either:
(defn r [bool] [:div (when bool [some element]])
The key thing is that there is no "calling" of
some as a result of the parent rendering. Just the placement (or not) of
some into a datastrcuture
ok, that addresses my confusion -- I read so many re-frame specific documentation today that i forgot all the basic reagent stuff lol -- thanks @mikethompson
All the fiddly details like
:width would be hidden away after potentially lots of children
All possible ... if that's the way you want it. We always try to bias our code towards the later-reader. And we like the style details clearly visible.
Some nice re-frame mentions A deep dive into ClojureScript reagent - https://news.ycombinator.com/item?id=13373426
I have a small prototype I built months ago with
re-frame. I picked it up again and wanted to upgrade both to the latest versions... now I'm getting this on the JS console:
Error: js/ReactDOM is missing ... that's from Reagent's
render . Any ideas?
my dependencies on lein: [org.clojure/clojurescript "1.8.40"] [cljs-react-material-ui "0.2.35"] [reagent "0.6.0" :exclusions [cljsjs/react cljsjs/react-dom ]] [re-frame "0.9.1" :exclusions [cljsjs/react cljsjs/react-dom ]]
@hlolli Thanks. I get a
Circular dependency compilation error if I don't exclude react-dom
its documentation clearly states to exclude
react-dom also... but then I get
Error: js/ReactDOM is missing
what should this function be named?
(if-atom [atm then else] (fn [_ _ _] (if <@U169ZE1J4> then else)))
since it's in the gui namespaced I want to just name if "if", so I can do "gui/if" ... but I don't want to override if
In re-frame, labels become spans with class "rc-label". Now, if I overwrite that class with my own class (css styles I want it to use) -- will bad things happen via flexbox, or is this a safe op?