This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-28
Channels
- # admin-announcements (1)
- # aleph (3)
- # bangalore-clj (4)
- # beginners (167)
- # boot (14)
- # cider (4)
- # cljs-dev (24)
- # cljsjs (21)
- # cljsrn (33)
- # clojure (214)
- # clojure-greece (2)
- # clojure-italy (2)
- # clojure-korea (16)
- # clojure-russia (29)
- # clojure-spec (31)
- # clojure-uk (86)
- # clojurescript (144)
- # core-matrix (2)
- # cursive (37)
- # datascript (5)
- # datomic (104)
- # devcards (2)
- # events (2)
- # jobs (2)
- # luminus (8)
- # midje (1)
- # nyc (4)
- # off-topic (1)
- # om (39)
- # om-next (1)
- # onyx (47)
- # perun (1)
- # planck (6)
- # proton (2)
- # re-frame (25)
- # reagent (40)
- # spacemacs (9)
- # vim (71)
- # yada (3)
🎶 never stop ... rendering 🎶
Does anyone know what's the cause of this react warning (with reagent):
react.inc.js:20541 Warning: ReagentInput is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component.
@pesterhazy Perhaps unrelated to the problem but why is the input type undefined?
hah good catch... didn't even see that
"Uncontrolled input" means that the input doesn't have value
right... I'm trying to figure out which input that could be
oh wow
it's because my input
didn't have a :on-change
handler
(because it's {:read-only "readOnly"}
curious, curious 🙂
@madvas thanks for packaging react-datetime for cljsjs, super easy to integrate
@pesterhazy np, enjoy! 😉
I had no idea that packaging an npm module could be so simple
@pesterhazy where do I look for react-datetime ... can't seem to find it
Hi, I’m new to the whole ecosystem. have gotten a good grasp of reagent, etc on it’s own. Trying to better understand pulling in React libs as most of the examples I see are using say Reagent to build components
@mikethompson, yup that's it
but I’m not sure how to say use react-datetime, once I’ve imported it. Is the component already ‘required’ on the JS side so I just do something like (… js/Datetime ..) in my cljs code?
@eoliphant this may be of interest: https://github.com/lambdaisland/thirdpartyjs
gotcha, yeah then I am not sure. My guess would be what you said tho, using js/
and then using adapt-react-class
to make it usable within reagent
I saw this, but this is more hacking than I’d like to do at this point lol.
(defn home-page []
(let [react-player (aget js/window "deps" "react-player")]
[:div
[:h2 "Zef Style"]
[:> react-player {:url ""}]]))
http://blob.tomerweller.com/reagent-import-react-components-from-npmOk, just looked up ‘adapt-react-class’ that seems more or less like what i’m looking for, I’ll play with that.
Hey @eoliphant, I wrote that blog post and it definitely is a bit hackish 🙂 though I have yet to find a better solution
Cljsjs is cool, just make sure the package you’re using is up to date. (they are often not)
lol 😉 well it looks like it works fine, it was more on my side. I’m already ‘sipping from the firehose’ so I was just trying to keep my moving parts down at the moment lol
good luck with that. It’s just a bunch of moving parts but nothing too complex
yeah, another thing i’m I think realizing is that say Reagent, Om etc are almost like their own frameworks that use React for plumbing, so hence the need to ‘adapt-react-class’ etc in order to make React components more ‘Reagenty’
yeah and to your point, for instance what’s on cljsjs for semantic ui is the jquery js, not the react version
(adapt-reagent-class js/Datetime) works in the way you'd expect