Skip to content

Commit

Permalink
Expand description of watch=True in Param.ipynb (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvbalwada authored Mar 27, 2021
1 parent 8906eb5 commit af9cdb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/user_guide/Param.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Whenever the continent changes it will now eagerly execute the ``_update_countries`` method to change the list of countries that is displayed, which in turn triggers an update in the view method updating the map."
"Whenever the continent changes Param will now eagerly execute the ``_update_countries`` method to change the list of countries that is displayed, which in turn triggers an update in the view method updating the map. Note that there is no need to add ``watch=True`` to decorators of methods that are passed to a Panel layout (e.g. ``viewer.View`` being passed to ``pn.Row`` here), because Panel will already handle dependencies on those methods, executing the method automatically when the dependent parameters change. Indeed, if you specify ``watch=True`` for such a method, the method will get invoked _twice_ each time a dependency changes (once by Param internally and once by Panel), so you should reserve ``watch=True`` only for methods that aren't otherwise being monitored for dependencies."
]
},
{
Expand Down

0 comments on commit af9cdb5

Please sign in to comment.