rum icon indicating copy to clipboard operation
rum copied to clipboard

should-update error

Open thezjy opened this issue 4 years ago • 0 comments

Hot to reproduce

rum version: 0.12.3 react & react-dom version: 17.0.2

(defonce the-count (atom 0))

(rum/defc counter < rum/reactive {
                                  :did-mount (fn [] (println "did mount"))
                                  :should-update
                                  (fn [old new] ((println "should-update")
                                                 true))} []
  [:div {:on-click (fn [_] (swap! the-count inc))}
   "Clicks: " (rum/react the-count)])

(defn start []
  (rum/mount (counter) js/document.body))

should-update does not run and the error in console:

helpers.js:92 Uncaught TypeError: Cannot read property 'forceUpdate' of null at eval (core.cljs:377)

thezjy avatar Jul 06 '21 08:07 thezjy