-
Notifications
You must be signed in to change notification settings - Fork 414
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
How does re-rendering work? #224
Comments
@ccorcos just like the example shows that (defn counting-component []
[:div
"The atom " [:code "click-count"] " has value: "
@click-count ". "
[:input {:type "button" :value "Click me!"
:on-click #(swap! click-count inc)}]]) the div display the internal value of the atom |
I get that it does, but my question is how? How does the function know it
|
Github issues for Reagent are for bug reports and feature requests. Support requests and usage questions should go to the Clojure Slack channel, the ClojureScript mailing list, or the Reagent mailing list. Your questions above will be answered if you read these 3 pages: |
@ccorcos
My guess is, when Reagent renders a component it keeps track of the reagent/atoms that are being dereferenced by the component. The answer to how Reagent knows which atoms are being dereferenced, see how the code in the first link extends The code in the 2nd link is trying to mimic how https://github.com/mobxjs/mobx works. |
What does this mean?
https://reagent-project.github.io/
How does a function know to re-render?
The text was updated successfully, but these errors were encountered: