Hi. What does the :default mean?
It means a keyword name "default". If you want to learn about why that keyword is there, you need to tell us what exactly that "there" is.
I.e. we need context.
If it's in the ns
form and the project uses shadow-cljs, then it's explained in this section: https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages
interesting, do I need to define something to make goog.isDefAndNotNull
to work? Currently receiving this error from bide
Execution error (TypeError) at (<cljs repl>:1).
goog.isDefAndNotNull is not a function
and if I try to require this function it is not presentI am using shadow-cljs
Thanks. Thatβs the answer.
What's "bide"?
And what's the full stack trace?
sorry, bide is a routing library https://github.com/funcool/bide and internally it is using goog.isDefAndNotNull call
this error is the whole
TypeError: goog.isDefAndNotNull is not a function
at Object.insert (router.js:61)
at eval (core.cljs:117)
at eval (core.cljs:5655)
at eval (core.cljs:5655)
at Object.eval [as cljs$core$IReduce$_reduce$arity$3] (core.cljs:5659)
at Function.eval [as cljs$core$IFn$_invoke$arity$3] (core.cljs:2554)
at Object.bide$core$router [as router] (core.cljs:116)
at eval (router.cljs:6)
at eval (<anonymous>)
at Object.goog.globalEval (main.js:497)
Oh wow! We have bidi
and bide
, and both are routing libraries - not confusing at all. :D
But no clue for why you'd see that behavior. If you don't get an answer here, might be worth asking in #shadow-cljs
yeah! thank you!
Does anyone know how I can do something like this with hiccup?
<section data-auto-animate>
[:section ???]
[:section {:data-auto-animate true}]
Thank you π
Regarding nodejs (respectively, electron), does anyone know how to access global vars? I tried js/...
but failed. I'd like to get hold of electron's app (or win object, etc.)
const {app} = require('electron');
app.getPath('home');
but so far, no success. Javascript ppl get this in a heartbeat, so it should be easy with Clojurescript as well, shouldn't it?Ok, I just figured out
(defonce home-folder (.-env.HOME (js/require "process")))
gets me the data.Hello - what is the recommended library for http client calls from clojurescript?
Thanks
the advantage over using JS interop instead of something akin to cljs-http?
Native api, no deps, aligning with current "best practices", possibly less code because your using only what you need.
alright