Class 04: React and Forms
How to use Forms in React
What is a ‘Controlled Component’?
A controlled component refers to a form element, such as an input or textarea, whose value is controlled by the React state.
Any changes to the input are handled through the state and event handlers.
Should we wait to store the users responses from the form into state when they submit the form OR should we update the state with their responses as soon as they enter them? Why
How do we target what the user is entering if we have an event handler on an input field?
The Conditional (Ternary) Operator Explained
Why would we use a ternary operator?
Rewrite the following statement using a ternary statement
if(x===y){
console.log(true);
} else {
console.log(false);
}
Things I want to know more about
Nothing at the moment.