It sounds like this concern would be more appropriately managed through cache headers from the backend. In this implementation, it seems the frontend is deciding that the initial data fetch is good for as long as the app is open.
I am a polyglot seasoned software engineer. Besides the day job, I contribute to open source projects, beta test startup products, and offer consultancy.
It sounds like this concern would be more appropriately managed through cache headers from the backend. In this implementation, 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?