This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-10
Channels
- # 100-days-of-code (2)
- # announcements (2)
- # aws (11)
- # beginners (114)
- # boot (6)
- # calva (11)
- # cider (11)
- # cljdoc (2)
- # cljs-dev (7)
- # clojure (126)
- # clojure-berlin (1)
- # clojure-conj (4)
- # clojure-dev (1)
- # clojure-germany (12)
- # clojure-italy (22)
- # clojure-spec (96)
- # clojure-uk (111)
- # clojurescript (27)
- # core-async (8)
- # cursive (17)
- # datomic (26)
- # devops (5)
- # editors (15)
- # emacs (13)
- # events (1)
- # figwheel-main (27)
- # fulcro (64)
- # hyperfiddle (29)
- # jobs (8)
- # jobs-discuss (7)
- # liberator (4)
- # off-topic (46)
- # om (9)
- # onyx (1)
- # overtone (1)
- # perun (8)
- # re-frame (28)
- # reagent (35)
- # reitit (5)
- # shadow-cljs (96)
- # spacemacs (1)
- # testing (10)
- # timbre (8)
- # tools-deps (63)
- # unrepl (1)
- # yada (10)
@idiomancy If you have a project based on project.clj
but you'd also like to use deps.edn
, then you can use lein-tools-deps
https://github.com/RickMoynihan/lein-tools-deps
(Then you can trivially depend on a :local/root
or git :sha
by just changing deps.edn
)
Hey guys I’m trying to build a mental picture/roadmap on the conceptual similarities between some of the common React related libraries and their somewhat equivalent counterparts in cljs. If I understand things correctly, Reagent, Om, and React work in the same space which is essentially the view. To build on top of that and support a more managed/organized global application state, you use something like Redux or in cljs world, Re-frame or Om Next. Furthermore, if you’re looking for a library to help you efficiently (via one network call vs several roundtrip calls) and declaratively manage remote data calls, you would use libraries like Relay or Om Next. Is this description sound about right?
I would say that’s pretty much right. reagent is like react with mobx built in and a thin abstraction layer on top to make the ergonomics of react more lispy. re-frame is like a beefy redux with additional tooling. i think it is fair to say that om.next (and fulcro) are more ambitious efforts to integrate data fetching in a declarative way.
Thanks for all the insights delivered at my doorstep this morning. @mfikes I prefer the fn approach over the re-quote-replacement
. Much cleaner and more explicit working with a Matcher
than magic characters in strings.
@lee.justin.m consider blogging about those JS/CLJS homologues - that would be a useful starting point for people getting started with CLJS coming from React
Hi Folks, I just wonder if anyone can guide me to find the best way to add a hash to final javascript bundle name. For instance, at the moment, :cljsbuild configuration has a output-to a single file which is app.js but this is not optimal, I want to add a has or something to differentiate bundle file of each build in order to prevent browser caching. you help and advice is highly appreciate.
I'm trying to use https://www.npmjs.com/package/react-sortable-tree via :npm-deps
, and I'm seeing the following error in the console: Uncaught Error: Undefined nameToPath for module$Users$yogthos$src$react_dnd_test$node_modules$react_virtualized$dist$es$ArrowKeyStepper
it looks like the path exists node_modules/react-virtualized/dist/es/ArrowKeyStepper/
in the project
@yogthos yes many people have run into this. the workaround is to use webpack or shadow-cljs
thanks, do you know what the underlying issue is though, and can it be fixed in cljs compiler?
npm-deps just doesn't work for a sizable portion of npm modules
https://github.com/pesterhazy/cljs-spa-example <- here's an example of using webpack (which is pretty painless IMO), and here's one using shadow-cljs: https://clojureverse.org/t/ann-cljs-spa-example-a-demo-spa-based-on-figwheel-main/2743/2?u=pesterhazy
the doublebundle technique works with lein cljsbuild too of course
@yogthos I tried to use that same package some days ago 🙂 I ran into that problem and many others. I switched to shadow-cljs and now I'm happy
@yogthos Sometimes the issue is in the ClojureScript compiler, sometimes it is in Closure itself, sometimes it is in the library
so sounds like the consensus is that you can try your luck with :npm-deps
and if that fails setup shadow-cljs to build js libs using native tooling
Yeah. Another inexpensive thing to try is ClojureScript master and / or later versions of Closure.
works well and I’ve had great luck with figwheel-main and its support for npm https://figwheel.org/docs/npm.html