Fix Rendering/Caching Issue in React Native

Job ID: 37148382

Budget: €30 – €250 EUR

In Production, we have a non-deterministic behaviour of a database call loading endlessly. Reloading React solves the issue. So we assume, it has to do with React Rendering / Caching internals. We do not know how it exactly works internally so we would like to make a small project out of this issue.
We separated the relevant code into a sperate repo you can find here:
https://github.com/speisekammer/rn-ios-render-bug

The README.md basically tells everything. We load a value from firestore database using some abstraction logic.
To solve the bug you can change the react code by changing useState/useMemo/useCallback/useRef and their dependency lists, however you may not change the overall architecture of astracting the database call from the React component code.

The code is not open sourced and may not be used in your own projects.

Please send a PR with your changes that fix the described behaviour to complete the project.
The change must comply to the linter rules and must not introduce new bugs.