A React component fetches user data on mount using useEffect with an empty dependency array. The app shows stale data when navigating back to the page. What is the root cause?
-
A
React caches the component between navigations and skips remounting, so useEffect does not re-run
-
B
The empty dependency array causes the effect to run on every render
-
C
useEffect is not allowed inside functional components
-
D
React Native does not support useEffect