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 in Others by Kichu
• 19,040 points
124 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
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 in Others by Kichu
• 19,040 points
31 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 in Others by Ashwini
• 200 points
23 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 in Others by Kichu
• 19,040 points
245 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,280 points
2,686 views
0 votes
3 answers

ReactJS vs Angular Comparison: Which is better?

One picture, many facts How can you compare ...READ MORE

answered Aug 11, 2018 in Events & Trending Topics by slayer
• 29,310 points
423 views
+2 votes
4 answers
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP