Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React Native ternary operator display lag due to ajax request

$
0
0

I have isRegistered that I fetch via ajax call so isRegistered takes an amount of time to be set.

<View style={{ width: '48%' }}><Text style={style.labelStyle}>            {isRegistered ? 'Attempt' : 'Amount'}</Text></View>

As a result I see 'Amount' first (a few hundred of milliseconds so noticeable by human) before I can see 'Attempt'

How can I avoid this?

I am developping on IOS emulator (not device) but wonder it will also happen on real device


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>