You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I want to to get the countdown until value from an asyncStorage object. But it seems the countdown component renders before the asyncStorage.getItem is being fetched.
and then I insert an appAssessment.duration value in the until property of the countdown component like so:
until={Number(appAssessment.duration)}
The countdown timer always renders NaN. However, I also use this duration property in one of my other components as well and there it shows perfectly. It seems like I get this NaN value because it's still empty when the countdown component is being rendered. How can I solve this?
Also: the running option doesn't seem to work either, when i set state to false it keeps running...
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
I want to to get the countdown until value from an asyncStorage object. But it seems the countdown component renders before the asyncStorage.getItem is being fetched.
This is how I get the asyncStorage item:
and then I insert an appAssessment.duration value in the until property of the countdown component like so:
until={Number(appAssessment.duration)}
The countdown timer always renders NaN. However, I also use this duration property in one of my other components as well and there it shows perfectly. It seems like I get this NaN value because it's still empty when the countdown component is being rendered. How can I solve this?
Also: the running option doesn't seem to work either, when i set state to false it keeps running...
Thanks!
The text was updated successfully, but these errors were encountered: