Fork me on GitHub
#clojurescript
<
2019-03-04
>
lucasmreis01:03:37

Hi everyone! I worked in a project using Clojure a couple of years ago, and it was a really good experience. Today I work mainly with frontend, so I'm interested in having a look at Clojurescript!

lucasmreis01:03:13

One question: what would be a good setup if I want to embed a Clojurescript application inside a current JS application?

lucasmreis01:03:59

Let's say I have a React app, and I want to implement one component using Clojurescript, and import it from my main app.

lucasmreis01:03:04

Does anyone work with this setup? (I believe this is probably one of the most successful ways of introducing a new tech in a work environment, due to the low risk)

lucasmreis01:03:11

Thanks in advance! 🙂

idiomancy01:03:30

any tips for working with #core-async in node? Exceptions always crash the repl for me and its a pain to reload it. is there some kind of "dont blow up on exceptions" flag? Is it just a #shadow-cljs thing?

thheller07:03:57

@idiomancy nope thats a node thing. uncaught exceptions crash the process. you can setup https://nodejs.org/api/process.html#process_event_uncaughtexception

borkdude09:03:15

@lucasmreis if you want to write a React component in CLJS that is usable from JS, you might want to look at Reagent’s React interop: http://reagent-project.github.io/docs/master/InteropWithReact.html

👍 5
lucasmreis13:03:30

Is Reagent the way to use React with Clojurescript? Is anyone working with React directly?

borkdude13:03:50

@lucasmreis maybe https://github.com/Lokeh/hx will also be interesting. it’s using React pretty directly. You can even use it without a wrapper of course.

👍 10
john14:03:05

@lucasmreis you might consider #chrepl too, if you don't yet have access to the code base. Makes it easy to explore an existing app.

👍 4
john16:03:35

ah, you said, "Let's say I have a React app", in which case you can just add cljs to the project.