Q. How do you pass props to a component in React?

  • (A) Using the context API
  • (B) Using the `props` object
  • (C) Using Redux
  • (D) Using useEffect
πŸ’¬ Discuss
βœ… Correct Answer: (B) Using the `props` object
Explanation: Props are passed to components via attributes and accessed via the `props` object.
Explanation by: Mr. Dubey
Props are passed to components via attributes and accessed via the `props` object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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