Q. Which one is a correct way to create a functional component?

  • (A) function MyComponent() {}
  • (B) class MyComponent extends Component {}
  • (C) component MyComponent = () => {}
  • (D) def MyComponent() {}
πŸ’¬ Discuss
βœ… Correct Answer: (A) function MyComponent() {}
Explanation: Functional components are created using JavaScript functions.
Explanation by: Mr. Dubey
Functional components are created using JavaScript functions.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
85
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate