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

_prepare should EITHER modify context or return a context, not both #373

Open
kentmw opened this issue Feb 7, 2018 · 1 comment
Open

Comments

@kentmw
Copy link
Contributor

kentmw commented Feb 7, 2018

When you extend a view that has defined a _prepare and you want to extend/override it, you have no idea how to call ParentView.prototype._prepare.call(this, context); Does it return the context? Does it modify the one passed in? Torso did that logic but now everyone that extends one has to too (or they look at the specific implementation to see what it did)

@kentmw
Copy link
Contributor Author

kentmw commented Feb 12, 2018

I believe this is alleviated by having _prepare always return the context. You can optionally add and modify the context passed in, but that part is optional, not the returning the context

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

No branches or pull requests

1 participant