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
Copy file name to clipboardexpand all lines: mobx/CHANGELOG.md
+4
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
## 2.4.0
2
+
3
+
- Add `scheduler` to `reaction` and `autorun` to allow customizing the scheduler used to schedule the reaction. By [@amondnet]((https://github.com/amondnet).
/// * [delay]: Number of milliseconds that can be used to throttle the effect function. If zero (default), no throttling happens.
12
+
/// * [context]: the [ReactiveContext] to use. By default the [mainContext] is used.
13
+
/// * [scheduler]: Set a custom scheduler to determine how re-running the autorun function should be scheduled. It takes a function that should be invoked at some point in the future.
14
+
/// * [onError]: By default, any exception thrown inside an reaction will be logged, but not further thrown. This is to make sure that an exception in one reaction does not prevent the scheduled execution of other, possibly unrelated reactions. This also allows reactions to recover from exceptions. Throwing an exception does not break the tracking done by MobX, so subsequent runs of the reaction might complete normally again if the cause for the exception is removed. This option allows overriding that behavior. It is possible to set a global error handler or to disable catching errors completely using [ReactiveConfig].
/// Executes the [fn] function and tracks the observables used in it. Returns
35
41
/// a function to dispose the reaction.
36
42
///
43
+
/// Optional configuration:
44
+
/// * [name]: debug name for this reaction
45
+
/// * [delay]: Number of milliseconds that can be used to throttle the effect function. If zero (default), no throttling happens.
46
+
/// * [context]: the [ReactiveContext] to use. By default the [mainContext] is used.
47
+
/// * [scheduler]: Set a custom scheduler to determine how re-running the autorun function should be scheduled. It takes a function that should be invoked at some point in the future.
48
+
/// * [onError]: By default, any exception thrown inside an reaction will be logged, but not further thrown. This is to make sure that an exception in one reaction does not prevent the scheduled execution of other, possibly unrelated reactions. This also allows reactions to recover from exceptions. Throwing an exception does not break the tracking done by MobX, so subsequent runs of the reaction might complete normally again if the cause for the exception is removed. This option allows overriding that behavior. It is possible to set a global error handler or to disable catching errors completely using [ReactiveConfig].
49
+
///
37
50
/// The [fn] is supposed to return a value of type T. When it changes, the
Copy file name to clipboardexpand all lines: mobx/pubspec.yaml
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
name: mobx
2
-
version: 2.3.3+2
2
+
version: 2.4.0
3
3
description: "MobX is a library for reactively managing the state of your applications. Use the power of observables, actions, and reactions to supercharge your Dart and Flutter apps."
0 commit comments