2
I’m looking to audition in React.
I want to put a value on the input and will tell if the water has boiled or not, but there is no button.
You’re making a mistake and I don’t know how to fix it.
class Temperatura extends Component {
state = {query: '',};
ferver = (query) =>{
this.setState(() => ({
query:query.water =(query)=>{ return (query >=100) ? 'Agua ferveu.': 'Agua não ferveu.'}
}))
}
render(){
return (
<div className='App'>
<form>
<input
placeholder='Digite a temperatura da agua'
type='text'
value={this.state.query}
onChange={(e) => this.ferver(e.target.value)}
/>
</form>
<p>{this.state.query}</p>
</div>
)
}
}
export default Temperatura;
You can edit the question with the error you are having?
– vinibrsl