Center text inside Text component, React Native

Setting lineHeight of the component same as the height should fix it.

const styles = StyleSheet.create({
    container: {
        height: 30,
        lineHeight: 30,
        justifyContent: 'center',
        alignItems: 'center',
        fontWeight: 'bold',
        backgroundColor: '#fff',
    }
});