This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-06
Channels
- # aleph (13)
- # announcements (1)
- # babashka (89)
- # beginners (23)
- # calva (14)
- # circleci (7)
- # clj-kondo (39)
- # clj-on-windows (1)
- # cljdoc (5)
- # cljsrn (29)
- # clojure (98)
- # clojure-art (3)
- # clojure-conj (5)
- # clojure-europe (14)
- # clojure-nl (1)
- # clojure-norway (9)
- # clojurescript (18)
- # clr (39)
- # code-art (3)
- # community-development (3)
- # cursive (3)
- # emacs (11)
- # events (1)
- # fulcro (12)
- # graalvm-mobile (16)
- # graphql (3)
- # gratitude (1)
- # honeysql (19)
- # java (7)
- # joyride (23)
- # lsp (22)
- # malli (2)
- # missionary (25)
- # off-topic (15)
- # polylith (15)
- # rdf (5)
- # reagent (9)
- # reitit (3)
- # scittle (3)
- # shadow-cljs (37)
- # slack-help (2)
- # sql (10)
Having to deal with JS churn and breaking updates in react ecosystem is quite painful so i thought about different approach. I want to use javscript components i find in the wild (not npm packages) and i want to create local files and use those files/components in cljs project. There must be a way for me to do this but i can't seem to crack it. Specifically i am trying to use react native component from https://github.com/software-mansion/react-native-gesture-handler/blob/main/example/src/new_api/reanimated/index.tsx and include it my app.cljs. (i am using shadow-cljs, more info https://clojurians.slack.com/archives/C0E1SN0NM/p1673006091388299?thread_ts=1673003507.206739&cid=C0E1SN0NM How does one do this?
if this is react native you need metro to process these files. as such you can just require them via js/require
. the location is relative to whereever you are writing your CLJS output
I have a few years break from last time when I was comparing figwheel vs shadow cljs. How does it look today? Other solutions?
As I remember a few years ago in figwheel this https://github.com/kwladyka/form-validator-cljs/blob/doc/src/js/index.js was the best solution to include part of the material-ui
library instead of whole library. How does it look today in shadow-cljs / figweheel?
and later in the code https://github.com/kwladyka/form-validator-cljs/blob/doc/src/material_ui/core.cljs
You just require what you need:
(:require
["@material-ui/core/Button" :default Button]
["@material-ui/core/Card" :default Card]
["@material-ui/core/CardActions" :default CardActions])
Note that :default
is non-standard but I noticed that "...$default"
doesn't work in some cases - not sure whether it's been fixed or not and where such a fix is needed at all.
Here's my original mention of it to Thomas: https://clojurians.slack.com/archives/C6N245JGG/p1669756192844239?thread_ts=1669756069.405939&cid=C6N245JGG
The thorough documentation at https://shadow-cljs.github.io/docs/UsersGuide.html and the insane 🤯 amount of support provided by @U05224H0W in #C6N245JGG is reason enough to choose Shadow.
@U2FRKM4TW the $default
thing is fixed https://github.com/thheller/shadow-cljs/commit/c75498fe9c5e5e01943f8746d5f4113f210a1e80
What about EQL and other solutions? I think a few years ago the com.wsscode/pathom
was a way to go. How does it look today? Which solutions are worth to consider for BE <-> FE ? Something more automated by default, than coding custom REST.
https://clojurians.slack.com/archives/C0C4WV96U/p1673042571865769 - see for info on tickets, call for presentations, and sponsorship!