-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Thanks @koaning for the idea. There are just some little things to know when actually using widgets, especially the ipywidgets/traitlets ecosystem, which without documentation could lead to a "meh" overall experience with anywidget.
It would be nice to have an FAQ-style list of tips to steer folks into the pit of success with Jupyter Widgets.
Example:
widget = MyWidget()
widget.observe(on_change)
widget
very rarely is a blanket observe
what you want, since multiple traitlet changes will occur per user expected "change", causing the callback to fire multiple times and glitching.
It's better to specify names
and filter which changes you actually care about:
widget = MyWidget()
-- widget.observe(on_change)
++ widget.observe(on_change, names=["value"])
widget
koaning and kolibril13
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation