This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-25
Channels
- # beginners (20)
- # boot (25)
- # cider (1)
- # cljs-dev (7)
- # cljsjs (1)
- # cljsrn (1)
- # clojure (79)
- # clojure-austin (2)
- # clojure-berlin (13)
- # clojure-dusseldorf (1)
- # clojure-germany (7)
- # clojure-russia (10)
- # clojure-serbia (1)
- # clojure-spec (18)
- # clojure-uk (4)
- # clojured (1)
- # clojurescript (90)
- # cursive (10)
- # datomic (7)
- # emacs (14)
- # hoplon (6)
- # luminus (16)
- # lumo (4)
- # numerical-computing (2)
- # om (25)
- # om-next (1)
- # onyx (11)
- # pedestal (10)
- # protorepl (1)
- # reagent (11)
- # remote-jobs (1)
- # ring (1)
- # rum (38)
- # spacemacs (5)
- # test-check (7)
- # untangled (122)
- # vim (1)
- # yada (8)
I’m having issues with adding 3rd party js/react-components to my reagent-app. I’ve done a (:require [cljsjs.react-datepicker]), but I don’t know how to use it...
I noticed that I actually got a hint in the console: "Warning: Using native React classes directly in Hiccup forms is not supported. Use create-element or adapt-react-class instead"
@andnils try this:
(defn my-component [] [:div [:> js/DatePicker]])
@metametadata thx - that worked!
great! for convenience you can also extract it and use as the plain reagent component:
(def date-picker (r/adapt-react-class js/DatePicker))
; ...
(defn my-component [] [:div [date-picker]])
What's the difference between render and reagent-render in create-class?
I'm trying to write this function as reagent-render: https://gist.github.com/metametadata/3b4e9d5d767dfdfe85ad7f3773696a60#file-react-bootstrap-cljs-L47
But I need access to the component in the on-update. How do I get that?