This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-16
Channels
- # announcements (5)
- # aws (34)
- # beginners (145)
- # cider (48)
- # circleci (8)
- # clara (7)
- # clj-kondo (28)
- # cljs-dev (75)
- # cljsrn (4)
- # clojure (325)
- # clojure-czech (10)
- # clojure-europe (5)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-spec (6)
- # clojure-sweden (3)
- # clojure-uk (70)
- # clojurescript (18)
- # clr (1)
- # community-development (2)
- # cursive (38)
- # data-science (7)
- # datascript (14)
- # datomic (22)
- # emacs (2)
- # figwheel (1)
- # fulcro (6)
- # graalvm (22)
- # graphql (11)
- # hoplon (12)
- # jackdaw (8)
- # jobs-discuss (16)
- # juxt (5)
- # leiningen (19)
- # luminus (5)
- # nrepl (2)
- # nyc (1)
- # off-topic (6)
- # overtone (2)
- # pedestal (10)
- # re-frame (6)
- # reagent (8)
- # reitit (1)
- # rewrite-clj (43)
- # ring (2)
- # shadow-cljs (124)
- # testing (1)
- # vim (22)
- # xtdb (77)
- # yada (4)
I have the following,
(reagent/create-class
{:should-component-update
(fn [this old new]
(println "should-component-update" old new)
false)
:reagent-render
(fn [_]
(println "reagent-render")
[component])})
I see reagent-render
as I make changes to an input field in component
, but I do not see should-component-update
firing ever...My understanding is that should-component-update
should fire before reagent-render
is called.
Hmm, something must be wrong with my metaphor, the subscription I create in a outer let binding is derefed (not shown here) in component... How could :should-component-update
's function be aware of a derefed subscrition value in :reagent-render
's function?
I believe reagent calls forceUpdate
when it reacts to a ratom change, which would route around :should-component-update
are hooks integrated with reagent fully?