This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-18
Channels
- # aws (21)
- # babashka (32)
- # babashka-sci-dev (3)
- # beginners (17)
- # biff (1)
- # calva (8)
- # clj-kondo (1)
- # cljfx (8)
- # cljs-dev (3)
- # clojure (13)
- # clojure-belgium (1)
- # clojure-europe (16)
- # clojure-losangeles (2)
- # clojure-norway (6)
- # clojurescript (11)
- # conjure (1)
- # data-science (1)
- # fulcro (2)
- # gratitude (5)
- # helix (1)
- # joyride (3)
- # malli (14)
- # nbb (4)
- # off-topic (11)
- # other-languages (10)
- # polylith (4)
- # re-frame (2)
- # sci (3)
- # shadow-cljs (20)
- # spacemacs (3)
- # tools-deps (1)
- # vim (4)
I am using a JavaScript library that re-binds this
at runtime in order to access this
from an object literal.
Some quick searching let me to the this-as
macro. However, this doesn't resolve with nbb.
Could not resolve symbol: this-as
I am new to Clojure, am I missing something here?@xander.carls Unfortunately this-as
isn't supported in nbb :( but if you show me your code, perhaps I can recommend a workaround
Well, when trying to extract an example for you I found a workaround that works :)
It was from this MarkDoc Library here: https://github.com/markdoc/docs/blob/main/markdoc/nodes/heading.markdoc.js#L29
I thought that this.render
is binding the fn and executing it in some context., however here it refers to the Symbol Heading. Passing a string "Heading" instead of this.render
works.
Some people have asked for merch for my OSS projects (stickers, t-shirts). Here's a link to all the products: https://clojurians.slack.com/archives/CLX41ASCS/p1655582061874859?thread_ts=1655492617.008949&cid=CLX41ASCS