Nice job remembering that the Spotify.search() method returns a Promise and properly chaining a .then() before setting your state 👍
Consider renaming the tracks variable to searchResults so that you can benefit from using ES6's property/value shorthand syntax here:
this.setState({ searchResults })
You can use this whenever you need an object whose key is the same its value (i.e. { searchResults: searchResults } ) and you might find it makes your code more terse.
https://github.com/stefem/jammming/blob/master/src/components/App/App.js#L53-L57
Nice job remembering that the
Spotify.search()
method returns aPromise
and properly chaining a.then()
before setting your state 👍Consider renaming the
tracks
variable tosearchResults
so that you can benefit from using ES6's property/value shorthand syntax here:You can use this whenever you need an object whose key is the same its value (i.e.
{ searchResults: searchResults }
) and you might find it makes your code more terse.