From f982910fabe729e9ea5c1314512f96f59ff10938 Mon Sep 17 00:00:00 2001 From: Anton Skvortsov Date: Tue, 14 Jan 2020 17:27:34 +0600 Subject: [PATCH] awaiting while the metrics are calculated --- index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.tsx b/index.tsx index c98a96d..109003c 100644 --- a/index.tsx +++ b/index.tsx @@ -127,8 +127,8 @@ export default class MarqueeText extends PureComponent { this.setState({ animating: true }); - this.setTimeout(() => { - this.calculateMetrics(); + this.setTimeout(async () => { + await this.calculateMetrics(); if (!this.contentFits) { Animated.timing(this.animatedValue, {