Posted on Leave a comment

React Notes

List and keys

  • Don’t use index as key
  • Key must be unique
  • Passing key to the child of the list, not in the render function


Form

  • Textarea uses value attribute
  • Select doesn’t use selected attribute but specify the selected value in the value attribute of select opening tag
  • If passing value in as an array to a select element and multiple is set to true, select enables multiple value selected
  • What is a controlled component (vs uncontrolled component)
Leave a Reply

Your email address will not be published. Required fields are marked *