This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-25
Channels
- # announcements (22)
- # architecture (6)
- # beginners (76)
- # cider (44)
- # clara (6)
- # clj-kondo (34)
- # cljdoc (4)
- # cljs-dev (8)
- # clojure (162)
- # clojure-brasil (4)
- # clojure-dev (32)
- # clojure-europe (3)
- # clojure-italy (16)
- # clojure-japan (4)
- # clojure-nl (3)
- # clojure-poland (1)
- # clojure-spec (25)
- # clojure-uk (45)
- # clojuredesign-podcast (5)
- # clojurescript (91)
- # clojutre (3)
- # core-async (19)
- # core-logic (8)
- # cursive (60)
- # data-science (3)
- # datomic (7)
- # defnpodcast (2)
- # duct (5)
- # emacs (7)
- # fulcro (1)
- # graalvm (9)
- # graphql (1)
- # jackdaw (12)
- # jobs (1)
- # jobs-discuss (1)
- # kaocha (3)
- # leiningen (3)
- # luminus (2)
- # off-topic (44)
- # onyx (17)
- # pathom (6)
- # planck (15)
- # re-frame (1)
- # reagent (13)
- # rum (2)
- # shadow-cljs (43)
- # spacemacs (3)
- # sql (43)
- # tools-deps (3)
- # vim (43)
- # xtdb (13)
How do you do multiple classes in reagent?
Trying to use bulma is tough when i can't use the nice :div.class
syntax
You should be able to use :div.class.other-class
just fine, but you can also use [:div {:class "this-class that-class other-class"} ...]
, if you need to build a list of classes on the fly.
perfect!!!
thank you!
Also collection support was added so - [:div {:class ["classname-1" "classname-2"]}]
will work for building a dynamic list of classes.
You can also use :keyword
as a class name.
https://github.com/reagent-project/reagent/blob/master/src/reagent/core.cljs#L201-L211
Thanks for all your help everyone!
If I make a React component available as an argument to another React component's renderFunction/function-as-a-child, then define the renderFunction/FaaC in Reagent land, what is the proper way to render the React component passed in as an argument/prop to the renderFunc