A controlled component is a component that renders form elements and controls them by keeping the form data in the component’s state.
after adding the setState on the ChangeInput function, we can target the event as event.target.value The Conditional (Ternary) Operator Explained.
We use the ternary operator because it allows us to assgin one value to a variable that will return either true or false, also because it makes assigning values to variables easier to see and work with, because it’s all on one line.
ex:
if (x === y) {
console.log(true);
} else {
console.log(false);
}