This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-24
Channels
- # architecture (4)
- # aws (1)
- # beginners (76)
- # boot (172)
- # cider (17)
- # cljs-dev (10)
- # cljs-experience (24)
- # cljsrn (45)
- # clojure (129)
- # clojure-berlin (1)
- # clojure-finland (1)
- # clojure-italy (8)
- # clojure-seattle-old (1)
- # clojure-sg (1)
- # clojure-spec (31)
- # clojure-uk (28)
- # clojurescript (88)
- # cursive (11)
- # data-science (1)
- # datomic (44)
- # fulcro (48)
- # hoplon (5)
- # jobs (3)
- # jobs-discuss (1)
- # leiningen (6)
- # luminus (42)
- # lumo (17)
- # off-topic (9)
- # om (29)
- # onyx (15)
- # pedestal (7)
- # protorepl (20)
- # re-frame (24)
- # reagent (46)
- # ring-swagger (2)
- # specter (2)
- # sql (3)
- # uncomplicate (58)
- # unrepl (29)
- # yada (5)
@hugh.jf.chen what @mikethompson says is applicable for all Clojure code - the effects (and side effects, such as instantiating a reference to a subscription) of a function never occur if the function isn’t called.
Sorry if I’m stating the obvious 🙂
@mrchance but we dont have a cljsjs file for that library. (this one https://github.com/TeamWertarbyte/material-auto-rotating-carousel) How do i make one?
@sam16 Clojurescript has several ways to integrate js libs now, in your case you probably need :foreign-libs
or something like that, please refer to http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html or https://clojurescript.org/reference/dependencies
Re: Higher Order Components, I've found that the techniques explained here work well in Reagent also: https://facebook.github.io/react/docs/higher-order-components.html
@deadghost you need to require
the cljsjs namespace
that causes the foreign js to be included in by the closure compiler
well hmm, when I include cljsjs/rc-slider
I get TypeError: ReactInternals is undefined
I tried cljsjs react components I've successfully used in the past and they work fine
Assuming you are using Reagent (you are here after all) did you exclude react and react-dom from rc-slider?
[cljsjs/rc-slider "4.0.1-0" :exclusions [cljsjs/react cljsjs/react-dom]]
seeing that rc-slider 4 is ~year old, it is completely possible it doesn't work with current react
15.5 broke some libs
Should work the same as adapt-react-class
had a component that would render an image, and on :component-did-mount I was getting the size... which didn't work as expected
seems the actual image from [:img ...] loads a bit later after the component has mounted...
@profgra maybe you have sth like [component1] [component2] instead of [component1 [component2]] ?
Does someone have any clue about what it means? It's about a MenuItem (react-bootstrap component).
was having the same issue recently, and it was related to using reagent/children incorrectly
Strange because the tests in the dev version was ok. Thanks anyway, I'll check my components structure.