react-native-app-intro
react-native-app-intro copied to clipboard
Error with Android pagination
There is an error when rendering pagination on Android only. I've tracked it down to the DoneButton <Text> rendering:
This causes the dots to rerender (props changed) which causes the pagination to return to the previous page:
<View style={[styles.btnContainer, { height: 0, paddingBottom: 5 }]}>
<TouchableOpacity style={styles.full}
onPress={ isDoneBtnShow ? onDoneBtnClick : onNextBtnClick}
>
<Text style={[styles.nextButtonText, { color: rightTextColor }]}>
{isDoneBtnShow ? doneBtnLabel : nextBtnLabel}
</Text>
</TouchableOpacity>
</View>
This, on the other hand does not cause a rerender or the bug:
<View style={[styles.btnContainer, { height: 0, paddingBottom: 5 }]}>
<TouchableOpacity style={styles.full}
onPress={ isDoneBtnShow ? onDoneBtnClick : onNextBtnClick}
>
<Text style={[styles.nextButtonText, { color: rightTextColor }]}>
{doneBtnLabel}
</Text>
</TouchableOpacity>
</View>
The difference is the ternary operator in the <Text /> element. Could use some thoughts on how to approach this bug. Am I the only one seeing this?