uidotdev / react-course

Code for ui.dev's "Classic React" course

Home Page:https://ui.dev/classic-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing curly braces {} in fetchPopularRepos function in Popular.js

sreekarm opened this issue · comments

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

Those aren't needed. It'll implicitly return the result of calling setState but that doesn't really matter.