This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-31
Channels
- # aleph (12)
- # announcements (4)
- # asami (7)
- # babashka (20)
- # beginners (92)
- # calva (74)
- # clj-kondo (8)
- # cljdoc (70)
- # clojure (47)
- # clojure-dev (29)
- # clojure-europe (27)
- # clojure-nl (7)
- # clojure-norway (3)
- # clojurescript (7)
- # cursive (2)
- # datomic (1)
- # emacs (8)
- # events (5)
- # fulcro (36)
- # gratitude (4)
- # humbleui (25)
- # introduce-yourself (1)
- # lsp (26)
- # malli (6)
- # missionary (8)
- # nbb (50)
- # off-topic (9)
- # pathom (2)
- # pedestal (3)
- # portal (32)
- # practicalli (5)
- # reitit (5)
- # releases (1)
- # ring (6)
- # shadow-cljs (87)
- # sql (31)
- # tools-deps (26)
- # vim (3)
- # xtdb (15)
real question: what does ui/dynamic
do? also wondering if there's an explainer I'm missing
ah ok, it seems to automatically listen to any atoms that are derefed in the bindings list
Buf if re-render happens it compares declared dependencies and if they changed rebuilds component tree inside
Hope you don't mind me chiming in. I think it's worthwhile looking at https://github.com/thheller/shadow-grove as inspiration for state management.
i would not do that tbf for a generalized UI library. the whole "single atom with a normalized app db" state management doesn't make sense if you're trying to create reusable components that maintain their own state
things like shadow-grove's approach, re-frame, fulcro etc. make sense as higher level application frameworks
I agree with @U4YGF4NGM
I hope for Humble UI to have universal layer that can be bridged with any state management
> how does re-rendering components work? When you call -draw. It’s scheduled when -event returns non-nil, or you can schedule it manually by calling window/request-frame. The problem with dynamic as it is right now is that it will update when rendered but won’t schedule re-render itself
I see, so -draw
will locally redraw the component instance when called. it looks like most components also call -draw
on their children when it's called, too.
does window/request-frame
call -draw
on the root component instance, which is what you mean by scheduling it manually? can I get a reference to a specific component and call -draw
on it myself, to localize the re-render?