Replies: 2 comments 1 reply
-
LGTM, what about raising an issue or PR :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Flutter sky_engine by default uses LinkedHashSet for Set implementation.
https://api.flutter.dev/flutter/dart-collection/LinkedHashSet-class.html
Why don't we use LinkedHashSet as default for ObservableSet constructors ?
https://github.com/mobxjs/mobx.dart/blob/master/mobx/lib/src/api/observable_collections/observable_set.dart
This causes confusion in analogy of Set and ObservableSet. Ideally they should behave same with just an observable wrapper.
But if you use the default ObservableSet it will not retain the order of iteration. on
addAll()
or any other method.Also I would add these things to the docs if we don't change this behaviour.
I am aware of the alternate
ObservableSet.linkedHashSetFrom
provided separately in the api but ideally this should be the default one in my opinion.Beta Was this translation helpful? Give feedback.
All reactions