This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-18
Channels
- # aleph (4)
- # announcements (2)
- # babashka (48)
- # beginners (59)
- # calva (5)
- # cider (14)
- # clj-kondo (4)
- # cljs-dev (3)
- # clojure (77)
- # clojure-europe (6)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-spec (4)
- # clojure-uk (67)
- # clojurescript (19)
- # clr (3)
- # cursive (7)
- # datomic (36)
- # duct (33)
- # events (3)
- # figwheel (1)
- # fulcro (4)
- # funcool (2)
- # graalvm (3)
- # jobs (1)
- # joker (25)
- # kaocha (1)
- # leiningen (45)
- # malli (17)
- # off-topic (103)
- # quil (1)
- # re-frame (16)
- # reitit (1)
- # rewrite-clj (27)
- # shadow-cljs (39)
- # spacemacs (3)
- # sql (11)
- # tools-deps (14)
- # vim (41)
I’m trying to pull material-ui into a shadow-cljs project and it fails to load on the browser
looks like they might have migrated to "strict" interop mode? react doesn't have a default export so _react.default
doesn't exist
Is there a version of materiaul-ui you know that is compatible @thheller?
I still get an error on this for some reason.
Requiring like this ["@material-ui/core" :refer [Button]]
"dependencies": {
...
"@material-ui/core": "4.5.0",
}
Sorry, just saw this response. We are using the default export option, eg ["@material-ui/core/Button" :default button]
. I wonder if that would work.
in cases where we want the named export ["@material-ui/styles" :rename {ThemeProvider mui-theme-provider}]
my attempt fails with: (require '["three" :as three]) Execution error (ClassCastException..
@kaosko when reporting errors never ever shorten error messages. need to see the full error to make sense of it. I'm guessing you are in a CLJ REPL but can't say for sure without the full error
(require '["three" :as three]) Execution error (ClassCastException) at java.lang.String/compareTo (String.java:111). clojure.lang.Symbol cannot be cast to java.lang.String
ah, that's it thanks! I got the (shadow/dev :app) from https://github.com/thheller/shadow-cljs/wiki/REPL
The shadow.cljs.devtools.api/dev fn will turn your REPL into a CLJS REPL and auto-compile your project in the background: (shadow/dev :your-build-id)
yeah, dev is watch+repl combined so it would only work when the watch
isn't already running
is there a hook on shadowjs build where I can put the git sha hash of the current commint into the config section of a file? I want to be able to have the current git sha on the client build so when I push a release to production the server can say "here is the current sha" and the client can check "here is what I have" and can tell the client "your ui version is old, please refresh"
then shadow-cljs release --config-merge "{:compiler-options {:closure-defines foo.bar/SHA actual-sha}}"
I've now tried ["@material-ui/core/Button" :default Button]
and using older versions of material-ui
. I'm convinced I'm doing something wrong.
Hi not really an answer perhaps, but we switched to Bulma instead of Material UI. Really happy with that choice. Bulma is CSS only so no need to import any javascript and has similar functionality. Not sure if it works for your case but wanted to let you know!
ooo .. thanks @thheller.. will try and let you know how it works. is there better idea ? is there a better way that you can tell the users of an app that their UI is stale ?
v70 of shadow-cljs is crashing on me regularly:
14:09:56.270 [XNIO-1 I/O-7] DEBUG io.undertow.websockets.core.request - UT025003: Decoding WebSocket Frame with opCode 1
[2019-11-18 14:09:56.269 - WARNING] :shadow.cljs.devtools.server/cli-checker-shutdown
shutting down ...
14:09:56.273 [shadow-cljs-npm-process-checker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@39dafaca
14:09:56.278 [shadow-cljs-npm-process-checker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@3aedac1f
14:09:56.280 [shadow-cljs-npm-process-checker] DEBUG io.undertow - stopping undertow server io.undertow.Undertow@20d61be