I’m a newbie and having some issues with dismissing ion-loading when using the React hook on Ionic React v5.6.11.
I’ve tried the following ways so far:
const [present, dismiss] = useIonLoading();
// does NOT dismiss
const plain = () => {
present();
dismiss();
}
// does NOT dismiss
const withAwait = async () => {
await present();
await dismiss();
}
// DOES dismiss if timeout is 50 ms or more but not all the time
const withTimeout = () => {
present();
setTimeout(() => dismiss(), 50);
}
`
Please find an example project here
Any advice is much appreciated.