This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-26
Channels
- # announcements (2)
- # babashka (9)
- # beginners (95)
- # calva (4)
- # circleci (2)
- # clj-kondo (5)
- # clojure (57)
- # clojure-berlin (2)
- # clojure-conj (3)
- # clojure-europe (6)
- # clojure-italy (14)
- # clojure-nl (3)
- # clojure-switzerland (5)
- # clojure-uk (32)
- # clojuredesign-podcast (5)
- # clojurescript (29)
- # clojutre (16)
- # code-reviews (6)
- # data-science (6)
- # datomic (9)
- # fulcro (33)
- # graalvm (2)
- # jobs (1)
- # jvm (1)
- # kaocha (6)
- # leiningen (4)
- # off-topic (3)
- # re-frame (31)
- # reagent (16)
- # reitit (22)
- # remote-jobs (2)
- # shadow-cljs (70)
- # spacemacs (19)
- # sql (9)
- # tools-deps (13)
- # xtdb (2)
- # yada (3)
They should, yes.
Is there any way to have clojure proxy
functionality in cljs? I want to create an instance of a subclass of a given class. Looked around but didn’t find anything related..
I'm not sure what you are trying to accomplish but proxy
is JVM-specific, there is no concept of "interfaces" in JS
there’s Proxy
object is JS, don’t think it works same as proxy
though
hello all, im struggling to understand the proper interop incantations to access this library
using shadow-cljs, normally id do something like
(:require ["/foo" :as foo])
and then instantiate with (foo/Bar. ..)
but im not a javascript guy and I dont quite get how to access the QRCode class in this particular library
did you copy the file into your classpath? the file doesn't export anything so you can't use the normal syntax to access anything
you can probably make it work by adding module.exports.QRCode = QRCode;
as the last line in qrcode.js
im trying to basically do this: https://github.com/davidshimjs/qrcodejs/blob/master/qrcode.js#L514
Have you tried (new js/QRCode (.getElementById js/document "test) url)
?
Thanks for the reply. I think I did try that but I ended up switching to the npm-qrcode and got that working
(its also quite possible I didnt try that exact permutation and it might have worked, heh)
Is there a CLJS equivalent to how you can interpolate strings in Template Literals in ES6?
import { color } from 'demo'
const Test = `
${color}
`
I'm not aware that cljs nativelly supports interpolation in similar way as ES6, with funcool/cuerdas
you have the istr
macro:
(require '[cuerdas.core :as str :include-macros true])
(def foo "bar")
(str/istr "hello ~{foo}")
;; => "hello bar"
For anyone who suffer like us;
Here is the Hiccup Notation Implementation for the Javascript
!
https://www.npmjs.com/package/@thi.ng/hiccup#installation
Thank you to the Author !