This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-29
Channels
- # adventofcode (11)
- # beginners (98)
- # boot (2)
- # cider (3)
- # clara (3)
- # cljs-dev (15)
- # cljsrn (2)
- # clojure (122)
- # clojure-austin (4)
- # clojure-russia (1)
- # clojure-spec (2)
- # clojurescript (30)
- # css (6)
- # cursive (5)
- # docs (1)
- # fulcro (4)
- # hoplon (118)
- # keechma (3)
- # leiningen (5)
- # lumo (1)
- # off-topic (28)
- # onyx (6)
- # re-frame (4)
- # reagent (1)
- # reitit (1)
- # shadow-cljs (53)
- # sql (1)
- # unrepl (1)
you can see exactly what CIDER does to a new clojurescript repl in cider-create-sibling-cljs-repl
could you please help me with production build error?
ERROR: JSC_MISSING_PROVIDE_ERROR. required "clj_pouchdb.core" namespace never provided at /home/uyouthe/Repos/frontend/target/cljsbuild-compiler-1/frontend_boilerplate/db.js line 6 : 0
ERROR: JSC_MISSING_PROVIDE_ERROR. required "frontend_boilerplate.pages" namespace never provided at /home/uyouthe/Repos/frontend/target/cljsbuild-compiler-1/frontend_boilerplate/routes.js line 7 : 0
Idk why there's an error. Both namespaces are present and it also works in dev mode with figwheel@melvoloskov Curious if those two namespaces are in a :require
ns
spec in your code. (I'm guessing that Figwheel may process all the code it sees, but when doing an :advanced
build you get the transitive closure from the :main
namespace.)
hi all, what's the cljs approach to define JS constructors and assign the .prototype
property ? 😕 ... i'm trying see if i can implement the DeleteMenu
explained in this document - https://developers.google.com/maps/documentation/javascript/examples/delete-vertex-menu
Using #lumo with -v
option, I can see what is "emitted" in JS, for every cljs line.
cljs.user=> (aset js/DeleteMenu "prototype" "onAdd" #(+ 1 1))
Evaluating (aset js/DeleteMenu "prototype" "onAdd" #(+ 1 1))
(DeleteMenu["prototype"]["onAdd"] = (function (){
return ((1) + (1));
}))
This is what you need?@U2J4FRT2T thanks for the reply ... i was attempting to define DeleteMenu
...
oh, (defn delete-menu [] (as-this [x] (aset x "div_" (.createElement js/document "div"))))
What kind of charting (data visualization) libraries are popular these days, that don't involve buying into React? (standalone)
there’s nothing gui based for clojure outside react bindings that I would say qualifies as “popular”
hi, firebase returns a collection which I only can map with js native forEach. (js->clj col) does not convert it to clojure collection, which I then could map
also js->clj is a kind of clumsy tool, often you can do better with a combination of goog.object and aget / aset etc.
hmm, I don't get what's happening there. Using firebase-database you can do (js->clj (.toJSON snapshot)
. Even without doing js->clj
you can see/print a plain js object. Now, with firestore the snapshot return is diferent (one does not have .toJSON method). I can do forEach
on it, which is not usefull for me, I want to see/print that snapshot as plain js object (thing that firebase-database did with .toJSON method on snaphot) and store it somewhere
shouldn’t toJSON return a string?
just because you can call forEach on a thing doesn’t mean it’s an array that js->clj can do anything useful with
if it looks like a plain object you can iterate or map over it with goog.object also, without needing to turn it into a clojure value
ahh - json serializable representation - super weird
so I would just use (goog.object/map (.toJSON snapshot) f)