Oh the htmx is very cool. I think in my ideal world I was thinking something like this is a cool alternative. Reminds me of maybe like Phoenix live view or the old ruby unobtrusive js style.
Hey, everyone! I'm running into some inter-op troubles here. I have a function exported from a compiled clojurescript file that I'm trying to call in javascript, so I'm doing import { name.space.function as myfunc } from 'main.js', but it's giving me the error "expecting }" since it's not expecting the namespace .'s Is there a way to ^:export a function as a single keyword or some other way around this problem?
When you ^:export
something in CLJS, it becomes available as a global object, you don't need to import anything - you just have to make sure that the compiled CLJS bundle is loaded before that (well, I guess import
could be used for that - but you would have to import the file itself and not the namespace).
Just in case:
(ns a.b)
(def ^:export x 1)
should make window.a.b.x
available in JS.Hello, has anyone here used binaryage/chromex with shadow-cljs? I can’t get the repl to work, maybe I am doing something wrong. I am connected to the repl alright, but can’t seem to hot reload any code.
I think I got it working, never mind
Actually it works only for the pop-up and background but not the content script, is this expected?
Hi, I'm using a javascript library that uses a single named export object with other functions as properties of that object. So now I have to use somehting like:
(ns app
(:require ["lib" :refer [Layout]]))
(def Header (. Layout -Header))
I was just wondering if there is some destructuring syntax to bind Header directly in the :require?I don't think there's one. But you can make it a whopping 1 space shorter by replacing (. Layout -Header)
with (.-Header Layout)
. :)
How would I go about having a macro inside a cljc file? I just added a #?(:cljs (:require-macros [my.namespace]))
to my ns declaration, but that seems not enough
Ah, guess it does suffice. I just had to clear the temporary crap shadow-cljs and clj-deps create 🙂
Is nubank/workspaces still active project?
Thanks, at least that's something I guess 😉