This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-26
Channels
- # aws (8)
- # babashka (18)
- # beginners (17)
- # calva (19)
- # clj-kondo (2)
- # clojure (44)
- # clojure-brasil (100)
- # clojure-denver (8)
- # clojure-europe (20)
- # clojure-norway (165)
- # clojure-uk (1)
- # clojurescript (21)
- # cursive (4)
- # datalevin (18)
- # datomic (3)
- # emacs (22)
- # events (3)
- # hoplon (6)
- # hyperfiddle (13)
- # juxt (4)
- # kaocha (3)
- # london-clojurians (1)
- # malli (10)
- # off-topic (20)
- # pedestal (6)
- # rdf (7)
- # reagent (3)
- # releases (1)
- # shadow-cljs (5)
- # vim (3)
- # xtdb (3)
Hi folks, I'm trying to pack a fullstack Clojure/script project into a desktop app with electron. But I currently only found the success paths with pure clojurescript. I wonder whether it's achievable and what I should be aware of
I do believe its possible to bundle a JVM distro with your electron app, so Clojure is possible. However CLJS seems like the more economical choice. So definitely achievable as it can do anything regular JS can do.
I think I meant by Clojure running on a server and Clojure-script running on the desktop. My project includes cljc file which mix both sides of codes. Do you see any problems with this condition?
depends on what you mean by server. like an internet server that your app talks to, or a server thats part of the electron app you ship?
whatever it is there is no problem with this, many people do this for websites. adding electron into the mix doesn't change that.
Hello everyone, a small team of developers and I have developed a library in ClojureScript, which we are compiling using Shadow CLJS. After that, I created a simple web interface in JS. Now we have decided that we want to continue developing the project further and create a complex web application based on our library. We are new to ClojureScript, so we need advice on choosing a library for developing a web interface. While we are considering a Reagent for this purpose. I would be grateful if you would share your thoughts and experiences on this.
People ask similar questions at least once a month, so should be easy to find with search or even by scrolling this channel. E.g. that question from yesterday is very similar. Reagent, UIx, Helix - wrap React. I myself use Reagent. There are some projects that are CLJS-native and don't wrap anything, e.g. https://github.com/kennytilton/web-mx. But I prefer to avoid them since I often rely on React libraries.
Thank you for the answer. I may have expressed myself incorrectly. About what libraries there are, I have already Googled. I rather want to understand how satisfied are you with the choice of a particular library based on your experience with it.
I am satisfied with Reagent. :) Some other person will not be. You can't just take someone else's experience at face value because all workflows are different. E.g. someone heavily relying on React and its ecosystem will probably find Reagent more of a hindrance and will prefer UIx or Helix. It's best to create a toy project for each library with your desired workflow in mind and see how you feel about them. It will take a few hours but your decision will be incomparably more informed, drastically reducing the chance of later regrets.
yup… at $dayjob I use Helix because there are a few gems in the react ecosystem that just work better with Helix however, I will note Reagent does support function components and hooks. there’s nothing stopping you from emitting function components by default and using headless react libraries with reagent — it’d just be awkward because then you’d have ratoms and hooks and no clear indication of when to use which
the annoying part of Reagent when interoping with JS libraries is usually having to stick in r/as-element
everywhere and being mindful of when props are converted from kebab-case to camelCase
I absolutely love clojure and won't stop using it. I do however think a react.js front end is easier in the long run if you ever want to use an npm package or js lib from google, etc. The js interop still isn't amazing. shaddow-cljs has come a long way to help with that. You can write functional react with hooks for basically everything at this point. A lib like lodash or rhamba can help write clojury looking code around js objects.
> The js interop still isn't amazing. Do you have any specific problems that you'd like to be addressed?
n = 1 sample here, but I’ve had zero issues with JS interop with shadow-cljs and I use a ton of JS libraries in my codebases
when I do run into a problem, it’s because the JS library is one of those “CRA libraries” that only work with create-react-app projects and make a dozen assumptions about how you’ve configured your bundler but this isnt really a JS interop issue, because you’d have the exact same issues in any standard webpack/vite + JS/TS project
> Do you have any specific problems that you'd like to be addressed? Not generally. The last issue we had was as much re-frames fault as the interop. My main reason to favor js is that its easier to find js devs. And js is pretty simple already vs clojure where you get to write on top of java that is so much more painful.
I don't think I said they were. It is however a consideration as equal to which cljs library to use. Maybe only when coming from an existing js project?
Is there a way to programmatically navigate types protocols & implementations?
I.e something like get-method
for protocols:
(get-method atype aprotocol amethod-name)
I want to get a specific method by a type and not an instance