Hi
I am new to this forum so be gentle with me. I am after help with one of the react challenges ‘pass-a-callback-as-props’
When I run the test I get ‘Something went wrong please try later’ now sometimes this means there is something wrong with my code, other times, there is an actual bug. I have not found any bugs raised on this challenge.
Is anybody experiencing anything similar? Has anybody completed this challenge and can give me a hint? (Oh I also see that hints get a 404 not sure if this has been logged)
Thanks for any help you can provide
Andy
My code …
class MyApp extends React.Component {
constructor(props) {
super(props);
this.state = {
inputValue: ''
}
this.handleChange = this.handleChange.bind(this);
}
handleChange(event) {
this.setState({
inputValue: event.target.value
});
}
render() {
return (
<div>
<GetInput {
input: this.state.inputValue
handleChange: this.handleChange
}
/>
<RenderInput {
input: this.state.inputValue
}
/>
</div>
);
}
};
class GetInput extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h3>Get Input:</h3>
<input
value={this.props.input}
onChange={this.props.handleChange}/>
</div>
);
}
};
class RenderInput extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h3>Input Render:</h3>
<p>{this.props.input}</p>
</div>
);
}
};
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
.
Link to the challenge: