This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-12
Channels
- # beginners (102)
- # boot (5)
- # cider (1)
- # cljs-dev (15)
- # cljsjs (1)
- # cljsrn (20)
- # clojure (104)
- # clojure-austin (1)
- # clojure-europe (8)
- # clojure-italy (39)
- # clojure-nl (17)
- # clojure-spec (38)
- # clojure-uk (23)
- # clojurescript (34)
- # cursive (31)
- # data-science (5)
- # datomic (3)
- # emacs (28)
- # joker (1)
- # kaocha (5)
- # klipse (1)
- # leiningen (1)
- # off-topic (66)
- # quil (4)
- # reagent (35)
- # ring-swagger (1)
- # rum (1)
- # shadow-cljs (121)
- # test-check (1)
- # tools-deps (33)
- # uncomplicate (2)
- # vim (15)
- # yada (1)
Hello, what is the latest best way to use a React component in Reagent? I think I’ve read something about it being improved?
Hmmm might’ve asked a bit too quickly, but I reckon (.createFactory js/React js/TheComponent)
would work
@kah0ona [:> js/TheComponent]
should do the trick although I don't know about figwheel-main
- i'm using shadow-cljs
for me, 3 reasons:
[1] straightforward consumption of npm deps, without cljsjs
[2] build reports detailing the contribution of namespaces to javascript output size, which gives the information required for
[3] straightforward splitting of a codebase into modules which can be loaded separately
@kah0ona I tried both but shadow-cljs presented less problems for me with Vim so I stayed with it. Does figwheel have any particular edge over shadow-cljs?
btw: i was purely looking at live reloading aspect of things, maybe shadow-cljs does more
How can I do the following using cljs interop? I've got js/DatePicker working (react-datepicker), but now I want to add a Locale.
since you are already shadow-curious, i'll just put this here 😬: https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages
@kah0ona common approach is to bundle js deps with webpack and export everything you need into window
object, and connect js bunlde as foreign-library
thanks, this is how i did it previously as well indeed, but i wondered if there were more elegant ways nowadays. thanks!
@kah0ona just to give you an idea what this would look like with shadow-cljs:
(ns xyz
(:require ["react-datepicker" :default DatePicker :refer [registerLocale]]
["date-fns/locale/en-GB" :default enGB]))
(registerLocale "en-GB" enGB)
This answers also the question of why I chose shadow-cljs over figwheel (one of the reasons)
cool. yeah this seems a good reason of existence at all for shadow-cljs. Is the live reloading workflow as cool as figwheel’s?
I dont know how it works out for figwheel but i found the live reloads to be awesome in shadow-cljs. No complaints so far and you even get a web interface to force trigger compilations etc.
I also find shadow-cljs to be really beginner friendly.
Hey I am currently experiencing some trouble with re-frisk, maybe someone knows something about it, docs are really sold on "just works".
It doesn't load or get shipped. Neither 0.5.4.1
nor 0.5.3
, it's in lein :compiler :preloads
, same for Firefox and Chromium, and there is just no code in the site. I am using figwheel too. Is there something I am missing?
Hi. I'm literally doing my first steps with clojurescript (and clojure). I'm working through modern-cljs tutorial no. 1 https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-01.md Following exception is thrown during boot project compilation.
$ boot cljs
...
java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter
clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)
clojure.lang.ExceptionInfo: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter, compiling:(cljs/closure.clj:1:1)
Has anyone encountered this error? What am I doing wrong?
$ boot --version
#
#Mon Aug 12 23:04:29 CEST 2019
BOOT_VERSION=2.8.3
BOOT_CLOJURE_VERSION=1.8.0
BOOT_CLOJURE_NAME=org.clojure/clojure
$ java --version
openjdk 12.0.2 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+10)
OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode)
Let me know if I can provide any other relevant info.@lbrdnk that tutorial is kinda old and assumes you are using Java8. Since you are using Java12 you probably need to update some dependencies
it might be enough if you just add [javax.xml.bind/jaxb-api "2.3.1"]
which should provide the missing DatatypeConverter
Thank you. It works now 🙂
Thank you as well! This helped me just now.