Equivalent way of writing param.watch with pn.bind

How do I migrate widget.param.watch(callback, "value") to the modern pn.bind?

Something finally clicked for me today…

If the callback doesn’t return anything:
pn.bind(callback, value=widget, watch=True)

1 Like