Question of Bmi-Calculator associated with reagent's atom

https://reagent-project.github.io/
Example “BMI calculator”
Slider Component is initialized with assoc atom(bmi-data) , I think it’s just a copy of atom(bmi-data) , so why atom(bmi-data)'s change will repaint Slider?

Slider is passed its values as function arguments, so any change of those will re-render it. It has no internal state.

The trick is to look for where the ratom is dereferenced — look for the @ sign, it’s only in calc-bmi, which is used in bmi-component.

FWIW, I think this example is more complicated than it could be…

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.