Question: What syntax do you use to create a component in React?

  1. a generator
  2. a function or a class
  3. a service worker
  4. a tag

Answer: The correct answer of the above question is Option B:a function or a class