What is a difference between an `if` block and `on_click` for a button?

Thanks again - and sorry, I should have read the whole thread, not only the quote…

To me, the crucial piece of information is this:

The key is that the callback happens before the page loads.

In other words, the counter will have the increased values for the whole re-run of the script if used with on_click, and only after the button if we use a button with if-block - good to know!

1 Like