Question: Why is useEffect ( ) needed for API calls? A . So that the code won't get stuck in an infinite re - rendering loop.

Why is useEffect() needed for API calls?
A. So that the code won't get stuck in an infinite re-rendering loop.
B. there is no perfect justification for this. it's just recommended by developer to use useEffect for API calls.
C. So that you have better control over when to make calls to API.
D. Both A and C
Why is useEffect ( ) needed for API calls? A . So

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!