expected assignment or function call: no-unused-expressions ReactJS

前端 未结 14 823
挽巷
挽巷 2020-12-07 16:26
class Game extends Component 
{
  constructor() 
  {
    super()
    this.state = {
      speed: 0
    }
    //firebaseInit()
  }
  render()
  {
    return 
    (
           


        
14条回答
  •  佛祖请我去吃肉
    2020-12-07 17:08

    I encountered the same error, with the below code.

        return this.state.employees.map((employee) => {
          
        });
    

    Above issue got resolved, when I changed curly braces to parenthesis, as indicated in the below modified code snippet.

          return this.state.employees.map((employee) => (
              
            ));
    

提交回复
热议问题