It is really great that you are using arrow functions!
Also if we use arrow functions and don't use curly brackets then we don't need to return, it returns automatically, so let us look at this code:
From:
|
}).then(response => { |
|
return response.json(); |
|
}).then(jsonResponse => { |
To:
}).then(response => response.json())
.then(jsonResponse => {
It is really great that you are using arrow functions!
Also if we use arrow functions and don't use curly brackets then we don't need to return, it returns automatically, so let us look at this code:
From:
jamming/src/util/Spotify.js
Lines 42 to 44 in f8f8617
To: