Skip to main content

Questions tagged [clojurescript]

ClojureScript is a dialect of Clojure that compiles to JavaScript.

clojurescript
0 votes
1 answer
38 views

Error when trying to run ClojureScript on Windows

I try to run ClojureScript "hello-world" project on Windows 10 Home 22H2 19045.4529. I follow documentation from https://clojurescript.org/guides/quick-start and get following output: C:\...
mikeeeeeee's user avatar
1 vote
2 answers
54 views

Trying to import libraries in Clojure

I have a problem with a code I am developing in Clojure: (ns problem2 (:require [cheshire.core :as json] [clojure.spec.alpha :as s] [invoice-spec])) (...
Luis Carlos Castillo Martin's user avatar
2 votes
2 answers
61 views

Tailwind-Elements React integration into ClojureScript

I am currently trying to use TailWindElements-React in Clojure Script. In JS an example would look like this: import React, { useState } from "react"; import { TECollapse, TERipple } from &...
Burning_Beef's user avatar
0 votes
1 answer
52 views

Using TWE-React with ClojureScript (import() in cljs)

I am currently trying to use TailWindElements-React in Clojure Script. In JS an example would look like this: import React, { useState } from "react"; import { TECollapse, TERipple } from &...
Burning_Beef's user avatar
1 vote
1 answer
82 views

Counting items within indexed map

How do you index and count items within an indexed map? Here's an example - I have example JSON data that looks like this - [ { "id" : "z1", "content_type" : "...
txesc's user avatar
  • 31
2 votes
3 answers
97 views

Are there any way to treat Javascript methods like ClojureScript functions?

I like ClojureScript, but to interop between CLJS and Javascript is difficult. I would like to create a function that can perform date culculations in arbitrary units, such as the following. But this ...
hata's user avatar
  • 187
0 votes
1 answer
85 views

What difference between syntax-quote in Clojure and syntax-quote in Clojurescript?

In Clojure REPL: (macroexpand-1 `(sum 2 1)) ; (user/sum 2 1) In Clojurescript REPL: (macroexpand-1 `(sum 2 1)) ; AssertionError: Assert failed: Argument to macroexpand-1 must be quoted Why it ...
rusfrompiter's user avatar
0 votes
2 answers
66 views

Shadow-cljs requiring react-select Creatable component

Currently I'm requiring using ["react-select" :default Select] in order to create a component: (def dropdown-standard (ra/adapt-react-class Select)) (this works perfectly) I want to access ...
Privisi's user avatar
0 votes
1 answer
62 views

CSS File Import Fails when using Path in ClojureScript Project

I am working on an Electric Clojure project and I need to import a CSS file to style my application. I add styles using dom/element and it works but the code looks so crowded. What is the best way to ...
Huseyin Yavas's user avatar
1 vote
2 answers
196 views

Best Practice for Storing Login Credentials in ClojureScript

In ClojureScript, I initially stored login credentials and authorization information in an atom state. However, I encountered a persistent issue where the atom state gets flushed upon page refresh, ...
Huseyin Yavas's user avatar
2 votes
1 answer
122 views

How do I apply a PostgreSQL function to a query using Clojure?

(ns training-clj.querys (:require [honey.sql :as honey] [next.jdbc.sql :as jdbc])) (defn get-by-username [db username] (let [query (honey/format {:select [:*] ...
newbie's user avatar
  • 21
3 votes
1 answer
112 views

Clojure/ClojureScript: How to plug in custom print implementation for EDN tag literals?

I have a record, an instance of and I print it to EDN string: (ns my) (defrecord Ref [type id]) (def rich (->Ref :Person 42) (pr-str rich) I would like to get "#my.Ref [:Person 42]. But I get ...
Witek's user avatar
  • 6,300
1 vote
1 answer
92 views

Implementing a graph in clojurescript

I have been trying to implement a graph in clojurescript , I am using c3.js library for the implementation and it’s failing to render the graph , I earlier got errors wrt c3.generate(), but even after ...
developerAtHeart's user avatar
0 votes
1 answer
83 views

Clojure(Script) higher order function to accept only functions from certain namespace

I'm trying to define a function (or macro) which should only accept as arguments functions from a certain namespace (ns ns1) (defn high-function[f & params] (if (condition on f meta ...
secret-john's user avatar
0 votes
1 answer
70 views

How can I stop my clojurescript app from blocking browser events while running?

Background For reference, I am building a little ECS game engine with: clojure threejs as one of the graphics targets shadow-cljs for builds The full code for the example can be found here. Problem ...
hjk's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
155