This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-02
Channels
- # adventofcode (6)
- # announcements (6)
- # babashka (21)
- # babashka-sci-dev (18)
- # biff (6)
- # clara (4)
- # clj-commons (2)
- # clj-kondo (7)
- # cljdoc (4)
- # clojure (9)
- # clojure-berlin (8)
- # clojure-europe (23)
- # clojure-gamedev (3)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-norway (10)
- # clojure-poland (1)
- # clojurescript (27)
- # community-development (1)
- # conjure (32)
- # etaoin (6)
- # events (20)
- # fulcro (5)
- # graalvm (1)
- # helix (19)
- # hyperfiddle (14)
- # introduce-yourself (2)
- # music (1)
- # nbb (24)
- # off-topic (37)
- # pathom (2)
- # polylith (14)
- # reagent (11)
- # releases (1)
- # remote-jobs (1)
- # reveal (22)
- # shadow-cljs (16)
- # sql (3)
- # squint (11)
- # test-check (2)
- # xtdb (36)
A beginner question. I am stumped as to why the DOM is not updating when I add to values in a collection in an atom. My code: https://github.com/jointprob/jointprob-shadow-cljs/blob/master/src/main/core.cljs#L32 See it in action on github pages: https://jointprob.github.io/jointprob-shadow-cljs/ In the console I can see that the samples atom is being updated but the DOM is not changed. Can someone see what I am overlooking?
Oh! Thanks, will give that a go
Yes, rdom/render
parameter is a bit special. Reagent can't register RAtom change listeners to any component in this case, so you need a component.
Thanks guys! That fixed my problem and the vega-lite components are updating beautifully too. :smiling_face_with_3_hearts:
Hey all (esp @gadfly361), updated my deps to new versions and spending today tracking down new console warnings for non-reactive use of subscribe.. I think I’ve tracked down a bunch to re-pressed/impl.cljs .. is this something to worry about? I think the warning is more for using subscribe in js event handlers, but I just want to be double sure. Thanks!
@rdonahue thanks for the heads up! re-pressed was written before re-frame put those warnings in. If you or anyone reading this thread is interested in submitting a PR to refactor, I would be happy to review.
Another question.. working with a JS interop component (PrimeReact kit) and its SplitterPanel seems to want a rendered component.. I'm passing a fn that resolves a component but if I wrap with [:div (get-panel panel)] it returns arity 0 errors.. how do I render the [:div ...] ?
Can you provide the relevant CLJS code, an example JS code, and a full stack trace of that error?
I think I just got it sorted out, that particular part of the code was like some of the first 'working' cljs I ever wrote and its solidly in the 'I have no idea how it ever worked' category.. subscriptions all in wrong places, wrong component forms being used.. totally refactored it and its now behaving normally.