#

React Error

 

Failed to compile

./src/components/Game_TicTocToe.js
  Line 44:5:  Expected an assignment or function call and instead saw an expression 
no-unused-expressions

Search for the
keywords to learn more about each error.

This error occurred during the build time and cannot be dismissed.

 

 

Error in React bei Zeilenumbruch in return

Error:

  renderSquare(i) {

    return 

    <Square 

      value={this.state.squares[i]}

      onClick={() => this.handleClick(i)}

    />;

  }

 

 

Lösung:

Mit einer runden Klammer die Return zusammenfassen

OK:

  renderSquare(i) {

    return(

      <Square 

      value={this.state.squares[i]}      

      onClick={() => this.handleClick(i)}

      />

    );

 

Mobile

.

0123movie.net