I am not sure since the implementation details are missing, but maybe you are loading the JSON via a useEffect hook in React and somehow save the data somewhere else inbetween? Then you would need to perform a cleanup action.
It is mentioned in the official docs that this should happen in strict mode, so the dev can find and fix bugs.
If you give further information, I can give a more educated guess. :)