This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-31
Channels
- # aleph (8)
- # announcements (11)
- # aws (1)
- # babashka (7)
- # beginners (104)
- # calva (52)
- # clara (1)
- # clj-kondo (28)
- # cljdoc (8)
- # cljsrn (2)
- # clojure (20)
- # clojure-europe (8)
- # clojure-uk (1)
- # clojurescript (26)
- # core-typed (3)
- # datomic (6)
- # holy-lambda (1)
- # jobs (1)
- # jobs-discuss (14)
- # malli (7)
- # pathom (31)
- # polylith (19)
- # re-frame (8)
- # reitit (1)
- # releases (1)
- # shadow-cljs (5)
- # tools-build (92)
Thanks for this; so I’m now trying it using your code above:
(defn login-button
[]
(let [login (.-loginWithRedirect (useAuth0))]
(println "login = " login)
[:button {:on-click (fn [] login)}])
)
And to render I have a minimal piece of code like so:
(defn nav
[]
[:> login-button]
This is giving me an error saying: Objects are not valid as a React child
in my console however; I saw where you said I should use ‘function component syntax’, but I’m not sure what that is, as I can’t see anything that jumps out as being equivalent in the reagent-core documentation at https://reagent-project.github.io/docs/master/reagent.core.html. Thanks again for your help.I tried that, when I try it I get Assert failed: Invalid tag: '' (in
in my console. Do I need an extra dependency or something I wonder?
Reagent documentation is not great when it comes to that website, but :f>
is documented in its repo somwhere.
No clue about that error though.
Ya, I figured the error was to do with the :f> not being recognised, as I messed around with other clearly incorrect tags such as :foo> for example and got the same error.