This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (42)
- # babashka (37)
- # beginners (62)
- # cider (13)
- # clj-kondo (12)
- # cljdoc (1)
- # clojure (80)
- # clojure-australia (2)
- # clojure-dev (43)
- # clojure-europe (69)
- # clojure-italy (8)
- # clojure-nl (10)
- # clojure-switzerland (130)
- # clojure-uk (12)
- # clojurescript (23)
- # code-reviews (8)
- # crux (1)
- # cryogen (5)
- # cursive (6)
- # datomic (3)
- # duct (4)
- # emacs (12)
- # fulcro (60)
- # kaocha (7)
- # lambdaisland (4)
- # malli (4)
- # meander (1)
- # nrepl (31)
- # off-topic (2)
- # re-frame (16)
- # rewrite-clj (5)
- # shadow-cljs (11)
- # spacemacs (7)
Hi! i was wondering if anyone had tips on using the leiningen re-frame template with doom emacs?
Basically my confusion is around what i should expect. I have some experience with a clojure app made with compojure, and apps built with bb. In both cases, when I connect to the repl from emacs, I can evaluate code in the buffer and see the results inline, e.g
(+ 1 2 3 4) => 10
I’ve made a new re-frame app with
lein new re-frame , and started it by running
lein deps and
I can connect to browser repl by running
cider connect cljs and choosing localhost:8777. I can then, in the repl , run commands like
(js/alert "hi") and see that alert box in my browser.
however, if i write new code and do
,ee to evaluate, nothing happens. I am unclear if this means that I have the project set up incorrectly, or if I am misunderstanding how that repl connection works. should i be able to evaluate sexp’s in my namespace, and not just the
cljs.user namespace? thank, you!
I think it belongs to the emacs Channel, but did you check if you had cider-piggyback in your deps?
Ah, thank you! I’ve got piggyback added, but still not working 😕 . I’ll move this to the emacs channel though!
Goodmorning all! I'm looking for a way to redefine app-db for a subtree of components. Practical use-case: I want to visualize different variations of the same component that uses subscriptions side-by-side using devcards. Before anyone suggest a best-practice to avoid this: The stateful behaviour is too complex (multiple subscriptions on multiple levels of nesting) to split up into a dumb component to put in devcards and control with a connected component in the actual app. Otherwise I would definitively do that (and am in fact doing that for most other components)
I tried with
with-redefs inside my devcard which didn't work. Probably because the card itself isn't the function doing the actual "rendering", so I guess the with-redefs is either coming in too early or too late to actually have an effect on the child components of the card
I think using
<iframe> with completely different apps would be the best and the simplest.
Thanks for those pointers! I'll have a read of that issue thread and see where that leads me. Iframes seems a bit cumbersome to me, since that means I would have to make extra stub apps which contain only the component that I want to test. Seems like a lot of boilerplate for what I'm trying to do?
Hmm, seeing the debate on that github thread and how A) there's no clear solution to this yet(!) and B) a lot of ideas around a solution seem to involve leveraging react context... I think I'll go with using context myself for this usecase. I'm lucky that the "subscribing" logic in my case is isolated in one component for now which is just repeated on multiple nesting-levels. So I'll replace that component with one that instead of doing a subscribe, gets its value from context and then wrap the higher-level component in a context provider which will get its value from the former subscription. (Sort-of) Again thanks for the pointers!!
Yes we are regularly re-visiting these, esp we have a pretty good plan re • https://github.com/day8/re-frame/blob/master/docs/EPs/002-ReframeInstances.md • https://github.com/day8/re-frame/blob/master/docs/EPs/003-ReusableComponents.md Any contributions or discussion is absolutely welcome 🙂 I recently enabled 'GitHub Discussions' for re-frame which may be a good forum discussing EPs ? https://github.com/day8/re-frame/discussions