Relative Content

Tag Archive for reactjsimagecachingfallbackreact-suspense

React suspense fallback retriggers

I have an image that I take from an API endpoint. For a reason, I’m importing the image component inside a Suspense with a fallback. The problem is that every time a useState or a useEffect is executed, the fallback of the Suspense is shown. Is there any way to prevent the Suspense fallback from being shown after the first render or when the image is cached?