This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-24
Channels
- # beginners (12)
- # cider (3)
- # clara (3)
- # cljs-dev (3)
- # cljsrn (19)
- # clojure (83)
- # clojure-android (1)
- # clojure-dev (15)
- # clojure-dusseldorf (1)
- # clojure-greece (30)
- # clojure-italy (10)
- # clojure-madison (1)
- # clojure-nl (6)
- # clojure-russia (274)
- # clojure-spec (51)
- # clojure-uk (31)
- # clojurescript (38)
- # core-async (7)
- # cursive (11)
- # datascript (1)
- # datomic (63)
- # emacs (10)
- # figwheel (1)
- # hoplon (27)
- # jobs (11)
- # klipse (4)
- # lein-figwheel (1)
- # lumo (6)
- # nyc (1)
- # off-topic (278)
- # om (12)
- # pedestal (10)
- # protorepl (31)
- # re-frame (13)
- # reagent (23)
- # remote-jobs (1)
- # spacemacs (9)
- # untangled (24)
- # yada (54)
Hi, how can I translate the InputGroup.Addon
in react-bootstrap component
<FormGroup>
<InputGroup>
<InputGroup.Addon>@</InputGroup.Addon>
<FormControl type="text" />
</InputGroup>
</FormGroup>
to a reagent component?For example I could use the InputGroup
as a input-group
, but I don't know how to change the InputGroup.Addon
to a similar tag.
@cmal, just use (.-Addon InputGroup)
However, there may be issues if react-bootstraps expects the addon to be a direct child of its parent
@pesterhazy ok, I'll have a try. Thank you.
@dimovich a React component is a fn that returns a React Element. So your component fn needs to return the result of r/as-element
[ContainerDimensions {} (fn [height] (r/as-element [my-component {:height height}]))]
whether this works depends on exactly how the component is implemented
@pesterhazy 👍 works for me! thanks
no problem
Hi, I'm new to Reagent and CLJS, and am building my first App. I'm trying to use the SimpleSidebar example form the cookbook and get this error that $ isn't defined. The instructions say just to copy the simple-sidebar.css and to setup externs.js (which defines $ etc). It seems like there should be some JS to include. Any ideas?
$
sounds like jquery. Which example are you referring to?
this one: https://github.com/reagent-project/reagent-cookbook/tree/master/recipes/simple-sidebar
was there some jquery tooling that I needed to install? None of the books or examples I've been using have referred to jquery.
jquery is included in that example: https://github.com/reagent-project/reagent-cookbook/blob/master/recipes/simple-sidebar/resources/public/index.html#L12