This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-19
Channels
- # announcements (13)
- # asami (43)
- # babashka (35)
- # beginners (175)
- # calva (23)
- # cider (5)
- # clj-kondo (68)
- # cljsrn (4)
- # clojure (61)
- # clojure-australia (7)
- # clojure-europe (20)
- # clojure-gamedev (59)
- # clojure-israel (11)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-norway (21)
- # clojure-spec (12)
- # clojure-uk (43)
- # clojurescript (9)
- # cursive (56)
- # data-oriented-programming (5)
- # datascript (1)
- # events (1)
- # fulcro (16)
- # honeysql (46)
- # leiningen (1)
- # malli (4)
- # off-topic (12)
- # pathom (46)
- # re-frame (24)
- # reagent (14)
- # reitit (1)
- # reveal (8)
- # rewrite-clj (16)
- # ring (13)
- # sci (9)
- # spacemacs (14)
- # specter (2)
- # sql (2)
- # tools-deps (1)
- # vim (2)
Apologies for the potentially super noob question. I'm using Krell (https://github.com/vouch-opensource/krell) to develop a mobile app and want to add more react native components such as Switch and Navigator. But the file https://github.com/vouch-opensource/reagent-react-native/blob/master/src/reagent/react_native.cljs does not include switch and many other react native components. I tried adding it by hand but it doesn't work. Am I missing anything super obvious? Any help would be much appreicated
@geo.ciobanu You can require (:require [react-native :as rn]
in your namespace, then call Switch like that [:> rn/Switch {:value ,,,}]
.
Make sense?
[:> ,,,]
is a macro shortcut for reagent/adapt-react-class
: https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md#creating-reagent-components-from-react-components
Thank you so so much Michael!
You're welcome!