Q. What is a higher-order component (HOC) in React?

  • (A) A component that returns another component
  • (B) A component that is used to wrap multiple components
  • (C) A function that takes a component and returns a new component
  • (D) A component with higher z-index
πŸ’¬ Discuss
βœ… Correct Answer: (C) A function that takes a component and returns a new component
Explanation: HOCs are used to reuse component logic.
Explanation by: Mr. Dubey
HOCs are used to reuse component logic.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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