This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-06
Channels
- # announcements (12)
- # babashka (34)
- # beginners (85)
- # calva (76)
- # cider (14)
- # clj-kondo (49)
- # cljs-dev (32)
- # clojure (418)
- # clojure-europe (3)
- # clojure-france (4)
- # clojure-italy (17)
- # clojure-losangeles (8)
- # clojure-nl (5)
- # clojure-norway (2)
- # clojure-spec (2)
- # clojure-uk (88)
- # clojuredesign-podcast (4)
- # clojurescript (49)
- # clojurex (75)
- # clr (2)
- # core-async (13)
- # cursive (6)
- # datomic (57)
- # duct (31)
- # emacs (6)
- # fulcro (25)
- # graalvm (67)
- # graphql (13)
- # hoplon (1)
- # java (6)
- # juxt (11)
- # kaocha (5)
- # keechma (2)
- # leiningen (16)
- # mount (1)
- # off-topic (19)
- # pathom (2)
- # pedestal (1)
- # re-frame (11)
- # reagent (21)
- # reitit (22)
- # rewrite-clj (1)
- # shadow-cljs (98)
- # spacemacs (5)
- # sql (16)
- # tools-deps (8)
- # vim (28)
- # xtdb (4)
Could someone point me to a tutorial/post or whatver as to how i can use react-hooks in reagent.
Im looking to translate this https://material-ui.com/components/autocomplete/
to reagent. and i managed to get it to render but then their hook fail because of what appears to be the ref function that comes from the TextField
My plan then was to implment the same thing using the hook directly but i could not figure out how
if you create a form-1 function, you could use the react/hook directly
or you can use hx
I was looking into hx but that would mean i have to migrate from reagent to hx right?
You don't have to. But if you don't have any particular reason to stick to Reagent, you should probably go with pure hx. Otherwise, you can mix them just fine.
You can easily wrap hx components to make them Reagent-compatible. Because hx just creates raw React components.
you can only use hooks in a react function component, so you can’t use them in any regular reagent component
here’s an example of how to use hooks with reagent http://reagent-project.github.io/docs/master/ReactFeatures.html#hooks