-
Notifications
You must be signed in to change notification settings - Fork 641
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
Introduce compose
, remove extend
#192
Milestone
Comments
How would |
Good question. I think |
reusing computed from "super" if overriding will probably be tricky though, that requires a helper function |
robinfehr
pushed a commit
to robinfehr/mobx-state-tree
that referenced
this issue
Jun 17, 2017
robinfehr
pushed a commit
to robinfehr/mobx-state-tree
that referenced
this issue
Jun 17, 2017
mweststrate
added a commit
that referenced
this issue
Jun 17, 2017
4 tasks
mweststrate
added a commit
that referenced
this issue
Jun 19, 2017
Basic compose implementation, see #192
Released as 0.8.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replaces
extend
, which is to be removed.Proposed api:
const NewModel = types.compose(BaseModel, newProps, newActions)
BaseModel.actions.actionName.call(this, args)
baseModel.isAssignableFrom(NewModel)
will yield false. If you need a place where both types are allowed, useunion(NewModel, BaseModel)
The text was updated successfully, but these errors were encountered: