This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-02
Channels
- # aleph (6)
- # beginners (57)
- # boot (1)
- # cider (27)
- # clara (23)
- # cljs-dev (166)
- # clojure (287)
- # clojure-dev (23)
- # clojure-greece (1)
- # clojure-italy (2)
- # clojure-russia (13)
- # clojure-spec (34)
- # clojure-uk (36)
- # clojurescript (68)
- # core-async (63)
- # core-logic (1)
- # cursive (1)
- # data-science (1)
- # datomic (26)
- # duct (1)
- # emacs (10)
- # figwheel (8)
- # fulcro (2)
- # garden (16)
- # graphql (8)
- # hoplon (20)
- # jobs (2)
- # leiningen (10)
- # off-topic (16)
- # onyx (2)
- # portkey (5)
- # quil (1)
- # re-frame (63)
- # reagent (95)
- # reitit (6)
- # remote-jobs (1)
- # ring (6)
- # rum (1)
- # shadow-cljs (76)
- # spacemacs (26)
- # specter (11)
- # sql (7)
- # unrepl (68)
- # vim (2)
- # yada (2)
For anyone who likes collecting points from answering SO questions 🙂
Anyone know how I'd access react-dom/test-utils if i have access to react-dom?
I realize I may be asking the wrong question here;
I have reagent
in dependencies, which has cljsjs.react-dom
in its dependencies, and I can access ReactDOM
from the REPL
I'm kind of getting the feeling that I should be using browserify...
but on the other hand it seems a little ridiculous; TestUtils
is right there in react-dom.inc.min.js
I have to go @zentrope, but lmk if you find anything
When using rebel-readline
is there a way to eval the whole form even when the cursor is in the middle of the form?
@dchristianbell I’m stumped. I looked at deps.cljs
in the react-dom jar and tried requiring those namespaces at the figwheel repl, but no js/ReactTestUtils.
@dchristianbell However, in my main.cljs file, I could: (ns my.main (:require [cljsjs.react.dom.test-utils]))
and then access the object in a function.
@dchristianbell And once I did a lein figwheel
with that declaration, I could reference js/ReactTestUtils
in the repl.
So, when using cljsjs
libs, look at the deps.cljs
in the jar and see if that clues you in. I hope I remember that myself. ;)
Does anybody else here have trouble using the externs generator here? https://jmmk.github.io/javascript-externs-generator/
Hi, is anyone using maps a lot with re-frame? Is there a good alternative for CLJS to leafletJS?
I’d be also interested to hear any experiences on Leaflet/OpenLayers/others with CLJS since I’m planning to build a web-map-app and considering which framework to pick.
don’t know of any alternatives, but it’s already packed as a cljsjs. API looks simple enough
think so too... but do I have to build a form3-component with a map? I am a bit struggling with the component-update, like inserting markers. Would be glad to get an example to look at.
I’d love to use re-frame but I’m a bit worried how nicely Leaflet actually plays with React. I mean, does react-leaflet work with plugins etc, does react-layer just bring extra complexity there or is it actually nice to use. I haven’t done myself much research on this yet, but would like to know if there are certain pitfalls to avoid.
Maybe my concern is that if I take the re-frame + leaflet road, do I end up solving lots of cljs/react/leaflet/js interop problems instead of building my app.
hi, can someone help me what is the best way to deal with promises in cljs
(let [axios (js/require "axios")]
(doto (.get axios "")
(.then (fn [resp]
(js/console.log "resp: " resp)))
(.catch (fn [err]
(js/console.log "err: " err)))))
but allways getting: (node:26933) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 8): Error: Network Error
@brunex This should help: https://stackoverflow.com/questions/40500490/what-is-an-unhandled-promise-rejection
not really, I guess what I need is some example of cljs code how to catch a promise error without that warning
what's weird about parseInt
?
you can use read-string
but beware that it will also read anything that's valid cljs
parseInt
is definitely weird if you forget to specify the radix. then it behaves like it is possessed.
@joelsanchez parseInt("99aa") = 99, and it returns NaN
supported by who? lein cljsbuild is a tool that uses lein, most things use clojurescript.jar in some way or another, there's a couple things out there that do self-hosted cljs
that is, lein cljsbuild is a thing that uses lein to run cljs.jar to compile your cljs - figwheel gives an awesome interactive development experience (can run via lein or boot)
that also uses cljs.jar
@acron: my team uses lein figwheel during dev, and lein cljsbuild to make js to deploy, I think that's very common
if you didn't know, the latest figwheel has an amazing repl with colorization and docs and multi line editing
Hello guys! I wanted to decide whether I make a single project for both server/api + client/ui or whether we make two separate. What are you thoughts about this?
Couldn’t find anything on Google in that regard yet
thanks!
You can do so in a single project
any thoughts on why? Any rationale?
in my experience working with a team, with a less disciplined group having separate repos for the frontend and backend leads to chaos and friction
i misread your question; I thought you were just asking if you could. Depending on how tightly the two are coupled, it's probably just less overhead to keep them together
to me it comes down to dev workflow - which would be worse, not knowing if your front and backend versions match (eg. can your team keep things flexible and compatible?) or having frequent merges in one codebase for totally unrelated work
the more disciplined / careful the coding style, the more an advantage to separation
Other question, not related: is :npm-deps
for clojurescript on the server (node) or it can be used for requiring frontend js library like react-modal, etc. with regular clojure/java backend?
@leontalbot I think it can be used for both, the caveat is that it is very very experimental
oh ok I see