Проверка статуса всех асинхронных функций перед рендерингом реакции ⇐ IOS
-
Гость
Проверка статуса всех асинхронных функций перед рендерингом реакции
I have a react application in which different APIs and local functions set the IndexedDB. This app is a hybrid app working on iOS Devices, but I am facing an issue.
If the Swift native screens open before all the async await functions are completed, I cannot run a plugin from Swift to react which contains the command that can set the IndexedDB using the async await function, till the Swift native screen remains open. It goes to some sort of backlog queue and is only executed once I have closed the Swift native screens.
But once all the async functions are completed before the swift native screens open, I can successfully make those DB updation calls. So is there a way by which I can know that all the async await functions resulting in IndexedDB updation are completed on the react side before I open the Swift native screens?
These updation calls are throughout the app, and I cannot keep the check that how many async calls are updating the DB. Any help would be appreciated.
Источник: https://stackoverflow.com/questions/781 ... ct-renders
I have a react application in which different APIs and local functions set the IndexedDB. This app is a hybrid app working on iOS Devices, but I am facing an issue.
If the Swift native screens open before all the async await functions are completed, I cannot run a plugin from Swift to react which contains the command that can set the IndexedDB using the async await function, till the Swift native screen remains open. It goes to some sort of backlog queue and is only executed once I have closed the Swift native screens.
But once all the async functions are completed before the swift native screens open, I can successfully make those DB updation calls. So is there a way by which I can know that all the async await functions resulting in IndexedDB updation are completed on the react side before I open the Swift native screens?
These updation calls are throughout the app, and I cannot keep the check that how many async calls are updating the DB. Any help would be appreciated.
Источник: https://stackoverflow.com/questions/781 ... ct-renders
Мобильная версия