Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 536 Bytes

Reading-3-04.md

File metadata and controls

15 lines (8 loc) · 536 Bytes

React and Forms

React Docs - Forms

  1. A controlled component is one whose data is handled by the component's state rather than the DOM.

  2. Update the state as it is entered, because the displayed value is dependent on the state.

  3. The event handler will have an event as a parameter; the user's entry can be targeted using event.target.value.

The Conditional (Ternary) Operator Explained

  1. It provides a way to write an if-else statement in a single line of code.

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