This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-15
Channels
- # announcements (15)
- # babashka (8)
- # beginners (23)
- # biff (20)
- # calva (6)
- # cider (9)
- # clerk (31)
- # clj-kondo (3)
- # clj-otel (2)
- # clojure (116)
- # clojure-argentina (1)
- # clojure-austin (5)
- # clojure-europe (64)
- # clojure-nl (3)
- # clojure-norway (23)
- # clojure-sweden (40)
- # clojure-uk (1)
- # cursive (16)
- # data-science (2)
- # datahike (8)
- # emacs (3)
- # events (1)
- # hyperfiddle (24)
- # malli (5)
- # off-topic (24)
- # re-frame (9)
- # releases (1)
- # solo-full-stack (25)
- # sql (18)
- # tree-sitter (19)
- # xtdb (10)
Hi all, I am stuck with a bug in an “input field” component of my app. When I pass a “disabled?” parameter (deref of an atom), the component seems to be rerendered (keeps subscribing) every second — although I am not sure about that, I only see the recurring subscription, print statements were not executed. Really weird (for me). Unfortunately the source code is to big to post it here, but perhaps someone is willing to jump on a screen sharing session some time within the next 5-6 hours?
If you're using the latest React, you can use React DevTools to see what made a particular component re-render. You can also use re-frame-10x to trace any values that are changing that might lead to a re-render.
I have re-frame-10x and see the subscription counter in “stats” counting up every second, but there are no eventse
Also, "every second" makes it sound like you call js/setTimeout
or a similar function somewhere - maybe just searching for those in the sources will reveal the cause.
Show us a screenshot of the sub code, and the button implementation. With this we can help you look to it
@U02G3DBJ2SY I know this isn't directly related to your issue but I wrote something about UI dev and its mostly to do with input fields, and re-rendering issues. Maybe it might help you. https://abhinavomprakash.com/posts/what-makes-frontend-development-tricky/