Missing curly braces {} in fetchPopularRepos function in Popular.js
sreekarm opened this issue · comments
Sreekar Maganti commented
fetchPopularRepos(selectedLanguage)
.then((repos) => this.setState({
repos,
error: null,
}))
.catch(() => {
console.warn('Error fetching repos: ', error)
this.setState({
error: `There was an error fetching the repositories.`
})
})
}
Missing curly braces in the above function declaration
Tyler McGinnis commented
Those aren't needed. It'll implicitly return the result of calling setState but that doesn't really matter.