expected assignment or function call no-unused-expressions ReactJS

0 votes

This is my code:

class Game extends Component 
{
  constructor() 
  {
    super()
    this.state = {
      speed: 0
    }
    //firebaseInit()
  }
  render()
  {
    return 
    (
      <div>
        <h1>The Score is {this.state.speed};</h1>
      </div>
    )
  }
}

export default Game;

I am getting this error when I execute the above code:

Expected an assignment or function call and instead saw an expression  no-unused-expressions

What is the problem with the code? 

May 18, 2022 in Others by Kichu
• 19,050 points
2,036 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Others

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
0 answers

Quectel EC20 LTE Module doesnt show me incoming call or sms

I'm using an LTE Module QUECTEL EC20 ...READ MORE

Apr 4, 2022 in Others by Kichu
• 19,050 points
299 views
0 votes
0 answers

what does bash: /home/XXX/.rvm/scripts/rvm: No such file or directory mean?

I was installing the ruby on rails ...READ MORE

May 26, 2022 in Others by Ashwini
• 4,070 points
325 views
0 votes
0 answers

React: Expected an assignment or function call and instead saw an expression

I want to fix lint error at ...READ MORE

May 23, 2022 in Others by Kichu
• 19,050 points
1,449 views
0 votes
0 answers

How to convert HTML to JSX (React.js)

<!DOCTYPE html> <html> <body> <script crossorigin src="https://unpkg.com/@daily-co/daily-js"></script> <script> callFrame = ...READ MORE

Aug 8, 2022 in HTML by Tejashwini
• 780 points
734 views
0 votes
0 answers

Calendar React JS

I have a homework to make a ...READ MORE

Jan 27 in Others by Tejashwini
• 3,770 points
57 views
0 votes
1 answer

How can I remove a port from url for node app using nginx

If you run your node server on ...READ MORE

answered Apr 10, 2018 in DevOps on Cloud by ajs3033
• 7,300 points
3,091 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP