clojurescript Questions
1
I followed this howto: http://blob.tomerweller.com/reagent-import-react-components-from-npm and it worked great. I even managed to use one of my own NPM module on top of this example app of re-fram...
Paraphrase asked 19/7, 2017 at 21:26
2
I am new to Clojurescript. I want to know how to create html elements, and how to change their properties using clojurescript. I cannot seem to find a lot of relevant information online.
Mal asked 21/7, 2017 at 3:27
1
I'm trying to get to grips with reagent in clojurescript with a simple drawing program.
I'm looking for an example of how to access the mouse position in a principled "FRP" inspired style with Rea...
Lefthander asked 21/2, 2017 at 1:30
2
Solved
In Clojure(script) you define programming constructs with deftype and defrecord. We want our constructs to each have a specific, well-defined purpose. Rather than evolve any one construct into a mo...
Exserviceman asked 6/7, 2017 at 14:59
2
I'm writing a webserver app in clojure with Hiccup (and other things).
I'm trying to have a check-box enable and disable two drop-down fields with a little JS but I can't make it work.
[:head
[:sc...
Jockey asked 5/7, 2017 at 17:23
1
About reagent.
I need to change some CSS class name dynamically.
How should I do that?
Sample code is here.
(defn app []
(let [array [1, 2, 3]]
(fn []
[:div
(for [index array]
;; I wanna c...
Schoenberg asked 13/6, 2017 at 23:40
3
Solved
I mean function, when given time returns smallest time unit ago.
E.g
"5 minutes ago"
"30 seconds ago"
"just now"
Rashid asked 10/9, 2015 at 20:53
2
I am trying to learn clojure.spec. While setting up a clojure project along boot build tool I am getting following error while requiring the clojure.spec.alpha.
Compiling ClojureScript...
• js/app...
Comet asked 7/5, 2017 at 9:25
2
Solved
I would like to understand difference between with-redefs and with-redefs-fn.
Concrete examples would be great to understand the fns behaviours.
Oecd asked 11/4, 2017 at 14:30
2
Solved
I came across Generative Testing in Clojure with spec notion and would like to learn about it.
Also providing some examples would be very useful.
Osman asked 11/4, 2017 at 14:14
6
Solved
I want to implement a function with ClojureScript to simplify js/console.log like this:
(defn log [& args]
(apply js/console.log args))
Calling it : (log "foo" "bar")
throws: TypeError: Il...
Fabrienne asked 16/6, 2014 at 8:10
1
Solved
To customise printing of records, I usually add a print-method:
(defrecord Op [type value]
Object
(toString [op]
(str [type value])))
(defmethod print-method Op
[v w]
(.write w (str v)))
b...
Dichroic asked 21/3, 2017 at 0:36
1
I would like to build an application with clojurescript language and angular2 framework.
I've found this project on github which provided a basic exmaple of combining these two.
But this is just a...
Isidore asked 16/3, 2017 at 8:49
3
Solved
I'm trying to pull an integer out of localStorage with a simple clojurescript app. Everything I've tried ended up trying has some sort of wrong behavior.
Below is my program without initializing f...
Petrochemical asked 27/7, 2011 at 2:18
4
Solved
How can I get the Clojurescript namespace I am in from within a clojurescript program? I want to do this do provide certain debug information (it only needs to work in dev mode)
Karinkarina asked 20/5, 2013 at 19:0
2
Solved
I could not set my dynamic var's value to new one.
(def *pop* true)
(set! *pop* false)
=> IllegalStateException Can't change/establish root binding of: *pop* with set clojure.lang.Var.set (Va...
Entopic asked 12/2, 2017 at 23:7
1
Solved
I have a reasonably large React + Relay codebase that is being built using Webpack. Is it possible to gradually introduce ClojureScript + Reagent into this somehow?
I was thinking of starting with...
Savoie asked 25/1, 2017 at 5:51
2
Solved
I came across those keywords: :foo, ::foo, ::bar/foo, and :bar/foo
Could you explain differences with examples?
Ningpo asked 6/2, 2017 at 14:54
1
Solved
I could not find a way to access :cause, :via and :trace keys of an exception.
Here is the code:
(try
(throw (IllegalArgumentException. "1"))
(catch Exception e
e))
Output:
#error{:cause "1...
Karb asked 2/2, 2017 at 19:55
5
Solved
Say I wanted to factor out some common code between my client-side *.cljs and my server-side *.clj, e.g. various data structures and common operations, can I do that ? Does it make sense to do it ?...
Allrud asked 20/10, 2011 at 1:13
4
Solved
In a small app I'm building that uses Reagent and Re-frame I'm using multi-methods to dispatch which page should be shown based on a value in the app state:
(defmulti pages :name)
(defn main-pane...
Cafeteria asked 23/10, 2015 at 10:4
2
Solved
I found it surprisingly tricky to define a macro to do error handling in both clj and cljs. I assumed it was a simple matter of swapping Exception with js/Error, but it turned out to be more compli...
Rocray asked 7/1, 2017 at 0:26
1
Solved
There are some math functions that end with apostrophe like: +', *', and -'.
What is the difference between non-apostrophe and apostrophe ones?
Sheepcote asked 4/1, 2017 at 0:41
4
Solved
Note: I'm a backend (Java) developer by trade and work in Clojure in my spare time, so forgive me for my ignorance.
I'm trying to get my head around Clojurescript and how it could potentially fit ...
Gilletta asked 9/2, 2012 at 21:55
1
Solved
The swap! function, one of the most idiomatic tools in the Clojure toolbox, does instance? checking. We are told in programming to avoid implementing conditionals around type checking, to prefer po...
Rees asked 18/12, 2016 at 22:53
© 2022 - 2024 — McMap. All rights reserved.