Raj was trying to figure out the flex property of React native.

import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { Constants } from 'expo';

export default class App extends Component {
render() {
return (
<View style={styles.container}>
<View style={[styles.layout, styles.rowStretch]}>
<Text>
This is my sample test statement which i am using to test this
concept.
</Text>
</View>
<View style={[styles.layout, styles.columnStretch]}>
<Text>
This is another sample test statement which i am using to test this concept.
</Text>
</View>
</View>
);
}
}

const styles = StyleSheet.create({
container: {
paddingTop: Constants.statusBarHeight,
flex: 1,
flexDirection: 'row',
},
layout: {
flex: 1,
padding: 15,
marginBottom: 5,
backgroundColor: 'whitesmoke',
flexDirection: 'row',
},
rowStretch: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'stretch',
},
columnStretch: {
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'stretch',
},
});

Choose the most appropriate output.

The code will execute without any errors and both statements will be displayed in the same row as two coloumns
The code will execute without any errors and both statements will be displayed in the different rows
The code will execute without any errors but only the first statement will be displayed
The code will run into errors
Correct Option - a

To get all Infosys Certified React Native Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in