Jason Miller

Results 1189 comments of Jason Miller

@louisremi ah, that `requestAnimationFrame` is actually to wait for Webpack to inject styles prior to re-rendering, not for throttling. Probably unnecessary, but I just didn't like seeing the flicker!

@serain Use an HTTP testing tool like [supertest](https://github.com/visionmedia/supertest).

Thanks for the kind words @Dylan-at-LION :) If you're up for it, we could probably add a wiki page with your last gist link explaining how to wire this up...

The route handlers can be arrays, you can include an authorization middleware as the first entry in the array and your handler as the second.

```js app.use('/photos/:photo', resource({ id: 'comment', mergeParams: true, load(req, id, callback) { const { photo } = req.params; comments.find({ id, photo_id:photo }) .then(callback.bind(null,null)) .catch(callback); }, async list(req, res) { req.photo. //...

Mentioned it in the other issue, but I'd recommend using something like [supertest](https://github.com/visionmedia/supertest) for testing, since that allows for passing through any registered middleware. For everything else, testing can be...

That seems like a nice idea. I'll try to find time today.

Interesting approach. I like the custom route decorator, but I wonder: why go with `@resource('name')` for decorating the class rather than just using inheritance? ``` js import { Resource }...

Overrides yes. What's the need to rename `delete`? It's a valid method name, and babel's transpiled classes add defined methods [using Strings for names](https://goo.gl/qLEhvr) (versus literals, which would be [reason...

Ah, good catch - `Router` [doesn't appear to be a class at all](https://github.com/strongloop/express/blob/master/lib/router/index.js#L42). Score one for the decorator solution...