This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-27
Channels
- # announcements (8)
- # babashka (7)
- # beginners (24)
- # biff (5)
- # calva (17)
- # cider (1)
- # clj-kondo (4)
- # clojure (61)
- # clojure-europe (5)
- # clojure-norway (19)
- # clojurescript (17)
- # conjure (1)
- # core-typed (14)
- # cursive (9)
- # datomic (7)
- # events (2)
- # figwheel (2)
- # helix (1)
- # honeysql (4)
- # jobs (3)
- # lsp (3)
- # malli (2)
- # nrepl (13)
- # off-topic (9)
- # pathom (6)
- # pedestal (3)
- # polylith (3)
- # portal (7)
- # reagent (4)
- # reitit (2)
- # shadow-cljs (49)
- # tools-deps (8)
- # vim (3)
I’m looking for references on how to connect to a nREPL server from a cljs webpage. I read the nREPL docs and tried with a websocket but doesn’t seems to like it.
Just need to pass {:op "clone"}
{:op "eval" :code "…"}
{:op "interrupt"}
to the server and read the reply. Any hints?
(posting here because #nrepl seems a bit quiet)
for that you first need a nrepl server that supports websockets. the default one doesn't. not sure there are any that do. what do you intend to do?
Not sure I need websocket. I want to expose the repl to the frontend of an electron app. So pretty much what an IDE does but in a cljs webpage
if you use shadow-cljs you can just use cljs-eval https://clojureverse.org/t/status-update-inspect-cljs-eval/6074#cljs_eval-2
assuming you want this as a development aid. if the point of the app is to be a full REPL client then you need a full websocket nrepl server
or I guess implement the nrepl protocol over tcp given that elecrtron can open tcp connections
How can I convert the react
useEffect(() => {
// do something
}, [array, dependency])
to reagent ?With a reagent this behavior can be implemented as follows with-let
https://github.com/reagent-project/reagent/blob/master/doc/CreatingReagentComponents.md#appendix-b---with-let-macro`track`
(require '["react" :as react])
(.useEffect react (fn [] (do-your-effect)) #js[your-dep])
Note that hooks can only be used within function components. You can tell reagent to treat a component as a function component like this [:f> your-function-component]
Relevant reagent docs https://github.com/reagent-project/reagent/blob/master/doc/ReactFeatures.md#function-components
Hi! Any idea when is update-vals
coming to clojurescript? I have switched to 1.11.4 but it seems not to be there. Thank you!
Ah, https://github.com/clojure/clojurescript/commits/master that update-vals
, iteration
and other stuff has been added in Q1, after the 1.11.4 release so I have to wait until the next cljs release... 😢
Has anyone used Mori in their JS projects lately? I'm wondering about the state of the project. https://github.com/swannodette/mori
Fair enough. I've been looking at https://github.com/92green/unmutable for a point-free style
Ah, https://github.com/clojure/clojurescript/commits/master that update-vals
, iteration
and other stuff has been added in Q1, after the 1.11.4 release so I have to wait until the next cljs release... 😢