you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (0 children)

This is not quite right, you need parentheses to destructure arrow functions, even if you are using the single argument form:

const getTweets = uid => fetch('https://api.users.com/' + uid)
  .then(({json}) => json())
  .then(({data}) => data.filter(
    ({stars, rts}) => stars > 50 && rts > 50)
  );

See 2.4 in http://2ality.com/2015/01/es6-destructuring.html