This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-12
Channels
- # adventofcode (112)
- # architecture (1)
- # beginners (55)
- # boot (26)
- # cider (19)
- # cljs-dev (19)
- # cljsjs (1)
- # cljsrn (7)
- # clojure (140)
- # clojure-android (3)
- # clojure-austin (3)
- # clojure-china (3)
- # clojure-gamedev (1)
- # clojure-greece (43)
- # clojure-spec (75)
- # clojure-sweden (5)
- # clojure-uk (21)
- # clojurescript (66)
- # core-async (2)
- # core-logic (1)
- # cursive (63)
- # datascript (5)
- # datomic (4)
- # devcards (2)
- # duct (13)
- # editors (5)
- # emacs (9)
- # figwheel (4)
- # fulcro (42)
- # graphql (25)
- # immutant (7)
- # jobs (29)
- # leiningen (13)
- # lumo (7)
- # numerical-computing (3)
- # off-topic (22)
- # om (2)
- # onyx (25)
- # pedestal (3)
- # re-frame (14)
- # reagent (20)
- # remote-jobs (1)
- # ring-swagger (3)
- # rum (12)
- # shadow-cljs (9)
- # uncomplicate (1)
- # unrepl (6)
cross-posted from #clojurescript
In my namespace where I want to add the component:
(:require ...
["react-flatpickr" :as flatpickr]
No error, so it means it is somehow recongized. But now I'm stuck...I can't seem to do anything with flatpickr
why is react-flatpickr in a string?
because I saw it somewhere configured like that, and that's the closest I've become - no errors or warnings
https://clojurescript.org/news/2017-07-12-clojurescript-is-not-an-island-integrating-node-modules
@kurt-o-sys what are you trying to do with flatpickr
I'm trying to do this: https://www.npmjs.com/package/react-flatpickr
import Flatpickr from 'react-flatpickr'
and <Flatpickr />
for a start would be fine 🙂
that <foo /> syntax will not work in cljs
sure not, I know that.
I want to make it work in cljs, so I tried to 'translate' these things to cljs, but I can't make it work.
So I followed that guide I mentioned earlier, but that doesn't work either.
as about any other guide I tried 😛
so copying the example you shared (:require ["react-flatpickr" :refer [FlatPickr])
then use FlatPickr
right... thx, will try 🙂
I’m not sure how the react syntax stuff translates though…
@kurt-o-sys @noisesmith so with the :as
syntax perhaps it is
(def FlatPickr (r/adapt-react-class flatpickr/FlatPickr))
[FlatPickr]