-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
inheritance should work with computed #3950
base: main
Are you sure you want to change the base?
Conversation
|
Similar to #3902 it diverges from established rules:
https://mobx.js.org/observable-state.html#limitations
If we need different set of rules for modern docorators it should be at least documented. Also we have subclassing tests for legacy decorators, they should be migrated/adapted: |
@urugator I personal lean toward a new set of rules for modern decorators, it's already very different from annotation in once we have |
Sure, but lets define what the rules are, what the expected behavior is, what the limitations are, how it should or shouldn't work with rest of the current api (makeObservable, ...), what can we do to prevent missuse, document it and test it. It should have been done with the introduction of the new decorators support, but here we are. The new decorators were introduced as almost 1-1 replacement for the old ones, turns out it's not. Regarding the fix itself I can't provide much insight, because:
|
I'm inclined to treat MobX 6 as transitional, and focus on what the sane behaviors would be in MobX 7, without conflating and needing to be consistent with either legacy decorators or makeObservable+decorators combo. |
Attempt to fix #3949
Code change checklist
/docs
. For new functionality, at leastAPI.md
should be updatedyarn mobx test:performance
)