clojurescript

ClojureScript, a dialect of Clojure that compiles to JavaScript http://clojurescript.org | Currently at 1.10.879
Dan Maltbie 2020-12-07T05:44:29.178800Z

That's one of the weird things, there isn't a stacktrace.

Dan Maltbie 2020-12-07T05:46:08.179Z

ttncore.store> (def b (fetch-block sfile "27hsXhXLBCT9zpPv"))

#object[TypeError TypeError: coll.cljs$core$IEmptyableCollection$_empty$arity$1 is not a function]
ttncore.store> 
This is the output from cider repl. Just two lines.

Dan Maltbie 2020-12-07T05:47:28.179200Z

I found the problem code two levels below the call shown above.

dpsutton 2020-12-07T05:49:23.180400Z

If it’s a browser based repl you can check the console and in the repl you can evaluate *e to see if it has the stack trace

fsd 2020-12-07T22:24:05.185100Z

Hello everyone, I have a  `shadow-cljs` react application. I am trying to add external yarn package react-google-recaptcha for google recaptcha human verification. The problem is its rendering an empty div <div> </div> Need help. required in ns [“react-google-recaptcha” :refer [ReCAPTCHA]] ($ ReCAPTCHA                                           {  :sitekey “APIKYS”                                        :size “normal”                                        :onChange #(handleChange)})

2020-12-08T10:40:29.186200Z

I supose that $ come from the Helix lib (React wrapper). If so, maybe you can try

($ ReCAPTCHA
  #js {:sitekey "APIKYS"                                       
       :size "normal"                                       
       :onChange #(handleChange)}) 

2020-12-08T10:50:18.186400Z

Forget about my last suggestion. In fact, you should try to call you required like that ["react-google-recaptcha" :default ReCAPTCHA]

2020-12-08T10:51:11.186600Z

The lib export only one default class https://github.com/dozoisch/react-google-recaptcha/blob/master/src/recaptcha.js#L4

2020-12-08T10:52:42.186900Z

You can find a useful table in Shadow-CLJS docs here: https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages

fsd 2020-12-08T15:38:41.193200Z

Thanks so much everyone @admin055 I was able the get it working by using your second suggestion ["react-google-recaptcha" :default ReCAPTCHA] Ty 🙌:skin-tone-2:

fsd 2020-12-08T15:39:11.193400Z

@p-himik $ is Helix lib

👍 2
2020-12-08T16:03:40.194400Z

My pleasure. 👍

🙌 1