rum
rum copied to clipboard
should-update error
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)