Reading-notes

Forms :

Controlled Components:

React component that renders a form also controls what happens in that form on subsequent user input. An input form element whose value is controlled by React in this way is called a “controlled component”.

### 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? finish untill they submit

### How do we target what the user is entering if we have an event handler on an input field? by using the onChange and onSubmit events

## ternary operator?

### Why would we use aternary operator? shortened way of writing an if-else statement.

### Rewrite the following statement using a ternary statement?

   x===y? console.log(true): console.log(false);