-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to bypass observability system for performance; Avoid unnecessary observable notifications of @observable
fields of Store
s; Fix Reaction lacks toString, so cannot see which reaction causes the error; Add StackTrace to reactions in debug mode to easily spot which reaction it is
#844
Conversation
✅ Deploy Preview for mobx canceled.
|
p.s. I may not merge this before PRs like #842 is merged, since otherwise my master branch will be destoryed |
Codecov Report
@@ Coverage Diff @@
## master #844 +/- ##
==========================================
- Coverage 98.96% 98.81% -0.15%
==========================================
Files 55 55
Lines 1924 1945 +21
==========================================
+ Hits 1904 1922 +18
- Misses 20 23 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please add a changelog and version bump for the mobx package.
- Need some more unit tests in places where Codecov has flagged.
test('bypass observable system', () {
final list = ObservableList<int>();
var count = -1;
expect(list.nonObservableInner.length, 0);
final d = autorun((_) {
count = list.nonObservableInner.length;
});
expect(count, equals(0));
list.add(20);
expect(count, equals(0));
d();
});
…n be properly disposed mobxjs#857
onDispose
callback to Computed
, such that old values can be properly disposed
feature implemented, test added, and passed |
@amondnet tests added |
onDispose
callback to Computed
, such that old values can be properly disposeddisposeValue
callback to Computed
, such that old values can be properly disposed
disposeValue
callback to Computed
, such that old values can be properly disposeddisposeValue
callback to Computed
, such that old values can be properly disposed; Add Computed.dispose()
method, which disposes existing cached value
disposeValue
callback to Computed
, such that old values can be properly disposed; Add Computed.dispose()
method, which disposes existing cached valuedisposeValue
callback to Computed
, such that old values can be properly disposed; Add Computed.dispose()
method, which disposes existing cached value; Avoid unnecessary observable notifications of @observable
fields of Store
s; Will PR if it is not a deliberate feature
test reproduced #855 |
merge from upstream
disposeValue
callback to Computed
, such that old values can be properly disposed; Add Computed.dispose()
method, which disposes existing cached value; Avoid unnecessary observable notifications of @observable
fields of Store
s; Will PR if it is not a deliberate feature@observable
fields of Store
s; Will PR if it is not a deliberate feature
Revert "dispose"-related features according to #860 |
This reverts commit 63d57ef.
This reverts commit 20fe5d3.
This reverts commit 263155b. # Conflicts: # mobx/test/computed_test.dart
…alues can be properly disposed mobxjs#857" This reverts commit bbd9020.
@observable
fields of Store
s; Will PR if it is not a deliberate feature@observable
fields of Store
s
@observable
fields of Store
s@observable
fields of Store
s; Fix Reaction lacks toString, so cannot see which reaction causes the error
@observable
fields of Store
s; Fix Reaction lacks toString, so cannot see which reaction causes the error@observable
fields of Store
s; Fix Reaction lacks toString, so cannot see which reaction causes the error; Add StackTrace to reactions in debug mode to easily spot which reaction it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi all, If this is in a "LGTM" state, is it just awaiting for @pavanpodila to approve or can someone else help with the load? Thanks. |
* add `nonObservableInner`, such that users can bypass observability system for performance * chore: format code * feat: Add `onDispose` callback to `Computed`, such that old values can be properly disposed #857 * test: add tests to `disposeValue` #857 * test: add tests for "Allow users to bypass observability system for performance" * feat: add `Computed.dispose` #859 * test: add tests for Computed.dispose * test: reproduce #855 * fix: Avoid unnecessary observable notifications of `@observable` fields of `Store`s #855 * Revert "test: add tests for Computed.dispose" This reverts commit 63d57ef. * Revert "feat: add `Computed.dispose` #859" This reverts commit 20fe5d3. * Revert "test: add tests to `disposeValue` #857" This reverts commit 263155b. # Conflicts: # mobx/test/computed_test.dart * Revert "feat: Add `onDispose` callback to `Computed`, such that old values can be properly disposed #857" This reverts commit bbd9020. * format code and minor change to code * add Observable.nonObservableValue * fix: Reaction lacks toString, so cannot see which reaction causes the error #864 * feat: Add StackTrace to reactions in debug mode to easily spot which reaction it is #864 * fix linter errors * add toString and debugCreationStack * test: add atom_test --------- Co-authored-by: fzyzcjy <[email protected]> Co-authored-by: fzyzcjy <[email protected]>
Close #857
Close #858
Close #859
Close #855
Close #864
Pull Request Checklist
pubspec.yaml
is updated.major
/minor
/patch
/patch-count
, depending on the complexity of changeset:versions
command usingnpm
oryarn
. You can find this command in thepackage.json
file in the root directory