Questions tagged [clojurescript-javascript-interop]

53 questions
0
votes
2 answers

Clojurescript: How to destructure a js-object in an idiomatic way

Trying to use antd from clojurescript I'm looking for an idiomatic way to destructure js-objects. So assume we want to do e.g. import { Layout } from 'antd'; const { Header, Footer, Sider, Content } = Layout; How can I do that from clojurescript…
fricke
  • 1,330
  • 1
  • 11
  • 21
0
votes
1 answer

Clojurescript with webpack and infer-externs requires undefined object with advanced compilation

I followed this guide on using webpack + clojurescript, https://clojurescript.org/guides/webpack. It works perfectly when compiled with :none or :whitespace, but when I compile with :advanced one of the objects hooked to the window ends up being…
0
votes
2 answers

How can I prevent the closure compiler from minifying certain methods in clojurescript?

I'm integrating quilljs with my clojurescript application. I'm including it in my project.cljs file like so: [cljsjs/quill "1.3.5-0"]. The compiler is minifying some methods and is causing an error: function xA(a, b) { var c =…
0
votes
1 answer

Using the resulting object from require call in ClojureScript?

In JavaScript there is the idiom: const ScrollTrigger = require('ScrollTrigger-classes'); var trigger = new ScrollTrigger({ once: true }); How do I do the same thing in ClojureScript using Shadow-CLJS for npm modules?
0
votes
1 answer

Clojure Spec : map? failing because spec thinks my data-structure is a vector?

I'm trying to validate a large clojure data-structure in Spec. I'm getting a failure on this part : {:pageName "HelloWorld" :pageType ::workPage :cells ["Hello World" "How are you?"]} using this : (s/def ::WorkPage (s/keys :req-un [::pageName…
0
votes
1 answer

trouble in emitting , using clojurescript + Reagent + cljsjs/ag-grid-react

I'm trying to use React ag-grid in Reagent (ag-grid reference) , but having trouble in emitting node AgGridReact , Implemented React.Component using pesterhazy approach , but emitting AgGridReact from rendor method is not working. Please suggest…
0
votes
2 answers

Clojurescript — PersistentArrayMap → Object → PersistentArrayMap — transferring data between web worker

I'm trying to pass a clojurescript map to a webworker. Before I pass it, it is of type PersistentArrayMap. cljs.core.PersistentArrayMap {meta: null, cnt: 3, arr: Array(6), __hash: null, cljs$lang$protocol_mask$partition0$: 16647951…} However, when…
-1
votes
2 answers

Kafka consumers in Clojurescript lang

Is there a way to create kafka consumers in a clojurescript app that I am trying to create. My kafka cluster is at AWS MSK which is configured to use SASL_SSL/IAM auths. And my client-side application is build on clojurescript. I tried to search for…
1 2 3
4