Not sure if I'm answering your question, but I use a function for opts so that I have access to `this`. For example, that lets me pass on `this.type` to each endpoint view, which I wouldn't be able to do with just an object.