I’m following a react tutorial that is provided on the react website, because I don’t feel like the one from FCC is working for me. I have a chunk of code that is throwing an error, and I don’t understand where it is coming from.
The error is "class properties must be methods. Expected ‘(’ but instead saw ‘=’.
Can anyone explain this error?
import React, {Component} from 'react';
import Table from './Table';
class App extends Component {
state = {
characters: [
{
'name': 'Charlie',
'job': 'Janitor'
},
{
'name': 'Mac',
'job': 'Bouncer'
},
{
'name': 'Dee',
'job': 'Aspring actress'
},
{
'name': 'Dennis',
'job': 'Bartender'
}
]
};
render() {
return (
<div className="container">
<Table characterData = {characters} />
</div>
);
}
}
export default App;