I cleared my cache and the tests passed fine.
Tell us what’s happening:
as far as I can tell, my code is identical to the solution and the tests won’t run, even though the code works. So then I even copied and pasted th esolution code and it still won’t run.
I’m OK with the lesson…I understand the topic, but the tests won’t pass, so tracking my progress isn’t accurate
**Your code so far**
This is actually the solution code>>> but I also came up with identical code...when it wouldn't pass I pasted the solution in and it still won't pas.
class ControlledInput extends React.Component {
constructor(props) {
super(props);
this.state = {
input: ''
};
// Change code below this line
this.handleChange = this.handleChange.bind(this);
// Change code above this line
}
// Change code below this line
handleChange (event) {
this.setState({
input: event.target.value
})
}
// Change code above this line
render() {
return (
<div>
{ /* Change code below this line */}
<input value={this.state.input} onChange={this.handleChange} />
{ /* Change code above this line */}
<h4>Controlled Input:</h4>
<p>{this.state.input}</p>
</div>
);
}
};
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Challenge: Create a Controlled Input
Link to the challenge: