DEV Community

Discussion on: Avoiding Race Conditions when Fetching Data with React Hooks

talha131 profile image
Talha Mansoor

it seems the frontend is deciding that the initial data fetch is good for as long as the app is open.

It is a perfect point.

If we ignore it for a moment please, then my question is, is it possible to leverage useMemo hook for caching data in the example? How will that work?