Code-Fellows reading notes.
An input form element whose value is controlled by React in t way that it renders the form and also controls what happens in that form on subsequent user input.
“The handleChange runs on every keystroke to update the react state” so I’m thinking this means it automatically updates as typed. I’m really not sure what the answer to this one it though I couldnt find it.
handleInpoutChange(event) {
const target = event.target;
const value = target.type === 'checkbox' ? target.checked : target.value;
const name = target.name;
this.setState({
[name]: value
});
}
if(x===y){ console.log(true); } else { console.log(false); }
condition ? (x===y) value if true : if false