Why this topic matters as it relates to what I am studying in this module?
An input form element whose value is controlled by REACT. We combine the HTML state which is updated based on user input, along with REACTs mutable state which is updated with setState(). With the controlled component, the input’s value is always driven by the REACT state. You can pass the value to other UI elements too, or reset it from other event handlers.
You don’t want to directly update/mutate state in REACT, that’s considered bad practice. It will cause issues in your application. Your component will not be re-rendered on state change if you make a direct state change, you have to use the setState function that allows us to update the value of the state.
You have to bind it in the constructor by using classes and arrow functions.
It can shorten your if statements into one line of code. It’s a shorthand way of writing if-else statements.
ternary statement: x === y ? console.log(true) : console.log(false);
1. 2. 3.