Skip to content
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

renamed asObservable() to toObs() #826

Closed
wants to merge 4 commits into from
Closed

renamed asObservable() to toObs() #826

wants to merge 4 commits into from

Conversation

subzero911
Copy link
Contributor

@subzero911 subzero911 commented May 30, 2022

Hello.
I was thinking about .asObservable(), it looks clumsy. It's not funny to write 1.asObservable() (and no big difference with Observable(1)).
Also, as looks like a cast, but actually it's a wrapping a value into Observable() (or creating an ObservableList from List).
I wanted a shorter and meaningful name. In GetX there's an .obs getter, but a line var x = 1.obs; is not obvious.
So I've chosen toObs(), it has the most native feel (like .toList())

@netlify
Copy link

netlify bot commented May 30, 2022

Deploy Preview for mobx ready!

Name Link
🔨 Latest commit 34d8b01
🔍 Latest deploy log https://app.netlify.com/sites/mobx/deploys/629486d9673c7d00081d390f
😎 Deploy Preview https://deploy-preview-826--mobx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #826 (34d8b01) into master (726025a) will increase coverage by 1.18%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #826      +/-   ##
===========================================
+ Coverage   98.81%   100.00%   +1.18%     
===========================================
  Files          56         5      -51     
  Lines        1933        97    -1836     
===========================================
- Hits         1910        97    -1813     
+ Misses         23         0      -23     
Flag Coverage Δ
flutter_mobx 100.00% <ø> (ø)
mobx ?
mobx_codegen ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/api/extensions/observable_future_extension.dart
.../src/api/extensions/observable_list_extension.dart
...b/src/api/extensions/observable_map_extension.dart
...b/src/api/extensions/observable_set_extension.dart
...src/api/extensions/primitive_types_extensions.dart
mobx/lib/src/core/context_extensions.dart
mobx/lib/src/core/atom_extensions.dart
mobx/lib/src/api/annotations.dart
mobx_codegen/lib/src/template/observable.dart
mobx_codegen/lib/src/template/computed.dart
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 726025a...34d8b01. Read the comment docs.

@subzero911 subzero911 changed the title toObs() renamed asObservable() to toObs() May 30, 2022
@subzero911 subzero911 closed this Jun 13, 2022
@subzero911 subzero911 reopened this Jun 13, 2022
@subzero911 subzero911 closed this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant