Q. What is the recommended place to fetch data in a class component?

  • (A) constructor
  • (B) render
  • (C) componentDidMount
  • (D) componentWillMount
πŸ’¬ Discuss
βœ… Correct Answer: (C) componentDidMount
Explanation: `componentDidMount` is the correct place to initiate data fetch after the component is rendered.
Explanation by: Mr. Dubey
`componentDidMount` is the correct place to initiate data fetch after the component is rendered.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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