Thanks for sharing.
My learnings are
- Instead of
onload
to update the UI I believe its a better pattern to usedefer_load
. At least that is how its documented Defer Bound Functions to Improve the User Experience. This makes your applications easier to reason about and restructure. For other tasksonload
is fine. See Defer Long Running Tasks to Improve the User Experience - Updating panel components in a function annotated with
watch=True
is an anti-pattern. Running some other side effect is fine.