Skip to content

Commit eeae710

Browse files
committed
Mention spectate to track changes to mutable data types
1 parent 9ea6a2a commit eeae710

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/source/examples/Widget Custom.ipynb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@
242242
" _model_module = Unicode(module_name).tag(sync=True)\n",
243243
" _model_module_version = Unicode(module_version).tag(sync=True)\n",
244244
"\n",
245-
" _view_name = Unicode('EmailView').tag(sync=True)\n",
246-
" _view_module = Unicode(module_name).tag(sync=True)\n",
247-
" _view_module_version = Unicode(module_version).tag(sync=True)\n",
248-
"\n",
249-
" value = Unicode('[email protected]').tag(sync=True)\n",
250-
"```"
245+
" _view_name = Unicode('EmailView').tag(sync=True)\n",
246+
" _view_module = Unicode(module_name).tag(sync=True)\n",
247+
" _view_module_version = Unicode(module_version).tag(sync=True)\n",
248+
"\n",
249+
" value = Unicode('[email protected]').tag(sync=True)\n",
250+
"```"
251251
]
252252
},
253253
{
@@ -288,6 +288,8 @@
288288
"Syncing mutable types\n",
289289
" \n",
290290
"Please keep in mind that mutable types will not necessarily be synced when they are modified. For example appending an element to a `list` will not cause the changes to sync. Instead a new list must be created and assigned to the trait for the changes to be synced.\n",
291+
" \n",
292+
"An alternative would be to use a third-party library such as [spectate](https://github.com/rmorshea/spectate), which tracks changes to mutable data types.\n",
291293
"</div>"
292294
]
293295
},

0 commit comments

Comments
 (0)