Components
Styling Text
Styling Component
TouchableHighlight
TextInput
100

What React Native component is used to contain other elements and apply layout styles?

<View>  

100

What prop changes the color of text in React Native’s <Text> component?
A. fontColor
B. color
C. textColor
D. tintColor

B

100

Which React Native object is used to create and organize styles?

StyleSheet

100

What is the main purpose of the <TouchableHighlight> component?

It makes a component respond to touch events (like a button).

100

Which prop sets the placeholder text that appears when the input is empty?

placeholder

200

Which component lets you input numbers only?
A. <Input type="number" />
B. <TextInput keyboardType="numeric" />
C. <NumericInput />
D. <NumberBox />

B

200

How do you center text horizontally?

textAlign: 'center'

200

What layout system does React Native use to position components?

 Flexbox

 

200

Which prop is used to detect when the user presses the component?

onPress

200

Which prop allows you to control the value of a TextInput with state?

value

300

How do you pass a parameter to a function in onPress?

onPress={() => myFunction(param)} 

Use an arrow function

300

How do you make text italic?

fontStyle: 'italic'

300

Which style property controls how components are aligned horizontally in a container using Flexbox?

justifyContent

300

What happens visually when a <TouchableHighlight> is pressed by default?

The background temporarily darkens (or “highlights”) to give feedback.

300

Which prop is used to detect changes in the text as the user types?
 

 onChangeText

400

Which layout system positions components?

Flexbox

400

Which style property adds space outside a component, between it and other components?

margin

400

Which style property controls how components are aligned vertically in a container using Flexbox?

alignItems

400

What must you wrap inside a <TouchableHighlight> for it to display something on screen?

A visible component like <Text>, <View>, or an <Image>

400

Which programming language is primarily used in React Native?

JavaScript

500

Which property makes text bold?

fontWeight: 'bold'

500

What happens if you set both padding and margin on a component?

Padding adds space inside the component, margin adds space outside.

500

How do you make a component fill the entire screen in React Native?

flex: 1

500

Explain how you can nest a <TouchableHighlight> and a <View> to create a custom-styled button.

Wrap a styled <View> inside the <TouchableHighlight>

500


What is the purpose of JSX in React Native?


To define UI components using a syntax similar to HTML. 


JSX allows developers to write UI components in a syntax similar to HTML, making the code more readable.



M
e
n
u