vinit agrawal
vinit agrawal

Reputation: 169

reactjs getting error Line 3:7: Parsing error: Unexpected token, expected ";"

I am newbie to react js and trying very basic program for class component.

here is my code

import React, { Component } from 'react'

Class Welcome extends Component{
   render(){
       return <h1>My Component</h1>
   }
}
export default Welcome

getting error on line no 4:7 as Unexpected token, expected ";"

Not getting where am i doing wrong.

I know something silly mistake is there but not getting where am i doing wrong.

Upvotes: 0

Views: 306

Answers (2)

aturan23
aturan23

Reputation: 5410

Your mistake on Class word. It should be lowercased like class. On docs you can check more about it.

Upvotes: 1

HermitCrab
HermitCrab

Reputation: 3274

There is typo in Class, it should be class

Upvotes: 1

Related Questions