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

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


        
14条回答
  •  盖世英雄少女心
    2020-12-07 16:50

    Instead of

     return 
     (
      

    The Score is {this.state.speed};

    )

    Use Below Code

     return(
       

    The Score is {this.state.speed};

    )

    Basically use brace "(" in the same line of return like "return(". It will fix this issue. Thanks.

提交回复
热议问题