Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should-update error #241

Open
thezjy opened this issue Jul 6, 2021 · 0 comments
Open

should-update error #241

thezjy opened this issue Jul 6, 2021 · 0 comments

Comments

@thezjy
Copy link

thezjy commented Jul 6, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant