You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* A watcher calls synchronously its notify function when any store in the set of transitive dependencies of the watched store is changing.
522
+
*
523
+
* Note that the notify function must not read or write any store. It should not do any heavy task, it usually only schedules some work to be done later.
524
+
* It is called even inside {@link batch}.
525
+
*
526
+
* A watcher is initially created in the dirty state.
527
+
*
528
+
* When a watcher is in the dirty state, the notify function is not called until the {@link Watcher.update|update} method is called.
529
+
*
530
+
* The {@link Watcher.update|update} method clears the dirty state and updates the watched store, allowing the notify function to be called the next
531
+
* time any store in the set of transitive dependencies of the watched store changes.
532
+
*
533
+
* When a watcher is no longer needed, it should be destroyed by calling its {@link Watcher.destroy|destroy} method.
534
+
*
535
+
* @param store - store to watch
536
+
* @param notify - function that will be called synchronously when any store in the set of transitive dependencies of the watched store is changing
0 commit comments