Tell us what’s happening:
I am experiencing trouble in passing test #3 (The rendered h1 header should contain text rendered from the component’s state.). I’ve searched through several topics regarding this lesson to no avail.
I also receive the error “invalid arrow-function arguments (parentheses around the arrow-function may help)” when I run the tests, to my knowledge so far I don’t see any arrow-functions in the code. Could anyone offer any insight please?
Your code so far
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
name: 'freeCodeCamp'
}
}
render() {
return (
<div>
{ /* change code below this line */ }
<h1>{this.state.name}</h1>
{ /* change code above this line */ }
</div>
);
}
};
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:52.9) Gecko/20100101 Goanna/3.4 Firefox/52.9 PaleMoon/27.6.1
.
Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/render-state-in-the-user-interface