-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
app.mixin() #68
Comments
for the most part subapps won't collide, if people build subapps that are meant to be mounted to any application I'd definitely suggest that they shouldn't be doing prototype manipulation anyway so I think we can skip that part. It's tempting to even remove app.context() for now and just encourage modularity via |
Ah yeah. It's easier to just do wrap(app) at this point. I'm all for removing app.context() |
k sweet let's do that for now |
consensus for now is to assume protos are nice enough to use without extending for now haha |
ohhh you can't extend at all now. i still want to extend it. i just think modules should extend it from |
I think it's an anti-pattern, a tempting one, but definitely an anti-pattern, tough call but I'd rather leave it out completely for now |
at least until everything else is well defined and finished, maybe after 0.1.0 |
I think it's an anti pattern if users rely on it, but it's fine for extending koa. I would make it private. It would be annoying to do things like yield body(this) |
that's annoying but it's also annoying to hunt down where these magical methods are coming from if you're unfamiliar with the app, but ugly indeed |
since we will have
app.context()
,app.request()
, andapp.response()
, i guess we should have something likeapp.mixin()
where you can do:so you can do with a plugin:
maybe
app.plugin()
. maybe a different, better name. also, anapp.inherit(parentapp)
would be nice as well, especially if you mount apps.The text was updated successfully, but these errors were encountered: