└── README.md
/README.md:
--------------------------------------------------------------------------------
1 | ## MCQ React Native Interview Questions and Answers
2 |
3 |
4 | #### 1. Which of these React native components will be used to display the name="React Native Tutorial"?
5 | - View
6 | - Text
7 | - span
8 | - p
9 |
10 | Correct Answer-
11 |
12 |
13 |
14 |
15 |
16 | #### 2. Which of the following components is the optimized way to show a long list of data?
17 | - View
18 | - Scrollview
19 | - Safeareaview
20 | - Flatlist
21 |
22 | Correct Answer-
23 |
24 |
25 |
26 |
27 |
28 | #### 3. How do you style your React Native component?
29 | - Stylesheet.create
30 | - Stylesheet.css
31 | - Safeareaview
32 | - Flatlist
33 |
34 | Correct Answer-
35 |
36 | Stylesheet.create
37 |
38 |
39 | #### 4. Which of the following is the correct plugin to navigate from one screen to another?
40 | - React Hooks
41 | - React Navigation
42 | - React Router
43 | - Screen
44 |
45 | Correct Answer-
46 |
47 | React Navigation
48 |
49 |
50 | #### 5. Which of the following is the correct way to render a webpage.
51 | Eg. render the homepage of https://www.amazon.com/ in React Native ?
52 | - React Native webview
53 | - React Native HTML
54 | - View
55 | - ScrollView
56 |
57 | Correct Answer-
58 |
59 | React Native webview
60 |
61 |
62 | #### 6. Which of the following is the correct method(hook) to make an api call on page load?
63 | - useState
64 | - useEffect
65 | - useReducer
66 | - useSelector
67 |
68 | Correct Answer-
69 |
70 | useEffect
71 |
72 |
73 | #### 7. Which of the following is used to make sure that your input fields don't hide behind the keyboard?
74 | - Keyboardavoidingview
75 | - Keyboardview
76 | - View
77 | - Scrollview
78 |
79 | Correct Answer-
80 |
81 | Keyboardavoidingview
82 |
83 |
84 | #### 8. Which of the following is used to color the status bar of the app in android?
85 | -
86 | -
87 | -
88 | -
89 |
90 | Correct Answer-
91 |
92 |
93 |
94 |
95 | #### 9. What is the use case of ActivityIndicator in React Native?
96 | - To display a circular loading activity
97 | - To display a progress bar activity
98 | - To open the app
99 | - To exit the app
100 |
101 | Correct Answer-
102 |
103 | To display a circular loading activity
104 |
105 |
106 | #### 9. What is the use case of ActivityIndicator in React Native?
107 | - To display a circular loading activity
108 | - To display a progress bar activity
109 | - To open the app
110 | - To exit the app
111 |
112 | Correct answer-
113 |
114 | To display a circular loading activity
115 |
116 |
117 | #### 10. How do we detect platforms in React Native?
118 | - Platform.OS
119 | - Phone.OS
120 | - Dimension.OS
121 | - RN.OS
122 |
123 | Correct answer-
124 |
125 | Platform.OS
126 |
127 |
128 | #### 11. Which of the following is the correct way to store data in a local device?
129 | - Asyncstorage
130 | - Localstorage
131 | - Sessionstorage
132 | - RNStorage
133 |
134 | Correct answer-
135 |
136 | Asyncstorage
137 |
138 |
139 | #### 12. Which of the following comes under dangerous permission in Android?
140 | - Read SMS
141 | - Ask Location
142 | - Show notification
143 | - Internet access
144 |
145 | Correct answer-
146 |
147 | Read SMS
148 |
149 |
150 | #### 13. What is the correct way to read SMS for OTP?
151 | - Ask for sms read permission
152 | - Use the SMS retriever api
153 | - Use firebase
154 | - Ask of location permission
155 |
156 | Correct answer-
157 |
158 | Ask for sms read permission
159 |
160 |
161 | #### 14. Which of the following is not a valid event listener?
162 | - onClick
163 | - onChange
164 | - onType
165 | - onPress
166 |
167 | Correct answer-
168 |
169 | onType
170 |
171 |
172 | #### 15. Which of the following is not a valid component in React Native?
173 | -
174 | -
175 | -
176 | -
177 |
178 | Correct answer-
179 |
180 |
181 |
182 |
183 | #### 16. Which of the following React Native components we cannot style?
184 | -
185 | -
186 | -
187 | -
188 |
189 | Correct answer-
190 |
191 |
192 |
193 |
194 | #### 17. Which of the following properties is used to change the direction of row/columns?
195 | - Flexdirection
196 | - Justifycontent
197 | - Alignitems
198 | - Flex
199 |
200 | Correct answer-
201 |
202 | Flexdirection
203 |
204 |
205 | #### 18. Which of the following components is used to make an input field in React Native?
206 | - input
207 | - TextInput
208 | - EditInput
209 | - InputText
210 |
211 | Correct answer-
212 |
213 |
214 |
215 |
216 | #### 19. Which of the following components is used to show an image in React Native?
217 | -
218 | -
219 | -
220 | -
221 |
222 | Correct answer-
223 |
224 |
225 |
226 |
227 | #### 20. Which of the following software/technology is necessary to run/develop RN apps locally?
228 | - Node JS
229 | - jQuery
230 | - React JS
231 | - CSS
232 |
233 | Correct answer-
234 |
235 | Node JS
236 |
237 |
238 | #### 21. Which of the following is not a part of the React Native Library?
239 | - Async Storage
240 | - ActivityIndicator
241 | - Stylesheet
242 | - Pressable
243 |
244 | Correct answer-
245 |
246 | Async Storage
247 |
248 |
249 | #### 22. What is the result we receive once we have the location permission access?
250 | - Both Latitude and longitude
251 | - Readable address
252 | - Only Latitude
253 | - Only Longitude
254 |
255 | Correct answer-
256 |
257 | Both Latitude and longitude
258 |
259 |
260 | #### 23. What is the correct property to set the size of a Text?
261 | - textSize
262 | - fontSize
263 | - fontStyle
264 | - font-size
265 |
266 | Correct answer-
267 |
268 | fontSize
269 |
270 |
271 | #### 24. What is the correct property to set the background color of a view?
272 | - bgColor
273 | - background
274 | - backgroundColor
275 | - backgroundStyle
276 |
277 | Correct answer-
278 |
279 | backgroundColor
280 |
281 |
282 | #### 25. React native is a framework developed by?
283 | - Facebook
284 | - Google
285 | - Microsoft
286 | - Amazon
287 |
288 | Correct answer-
289 |
290 | Facebook
291 |
292 |
293 | #### 26. What is the command to start a RN project on an Android device?
294 | - Npm run android
295 | - Npm run ios
296 | - Npm install
297 | - Npm android
298 |
299 | Correct answer-
300 |
301 | Npm run android
302 |
303 |
304 | #### 27. Which of the following is not the correct way to make an api request?
305 | - Axios.get(“url”)
306 | - fetch(“url”)
307 | - import(“url”)
308 | - XMLHttpRequest
309 |
310 | Correct answer-
311 |
312 | import(“url”)
313 |
314 |
315 | #### 28. Which of the following commands is used to navigate from one screen to another in RN?
316 | - navigation.navigate(“”)
317 | - Window.location.href
318 | - Location.href
319 | - Linking
320 |
321 | Correct answer-
322 |
323 | navigation.navigate(“”)
324 |
325 |
326 | #### 29. Which of the following properties is used in React Navigation to directly open the screen on the first app open?
327 | - initialRouteName
328 | - startScreen
329 | - Open
330 | - Start
331 |
332 | Correct answer-
333 |
334 | initialRouteName
335 |
336 |
337 | #### 30. What is the event listener attached to an input component to fetch the value?
338 | - onType
339 | - onChange
340 | - onClick
341 | - onPress
342 |
343 | Correct answer-
344 |
345 | onChange
346 |
347 |
348 | #### 31. What is the recommendation of releasing an app to google play store?
349 | - Bundle
350 | - Apk
351 |
352 | Correct answer-
353 |
354 | Bundle
355 |
356 |
357 | #### 32. Name the Hook that is used to change state in React Native?
358 | - useState
359 | - useDispatch
360 | - useSelector
361 | - useChange
362 |
363 | Correct answer-
364 |
365 | useState
366 |
367 |
368 | #### 33. Name the Hook that is used to fetch data from the store in Redux?
369 | - useSelector
370 | - useDispatch
371 | - useValue
372 | - useData
373 |
374 | Correct answer-
375 |
376 | useSelector
377 |
378 |
379 | #### 34. Name the Hook that is used to dispatch an action in Redux?
380 | - useDispatch
381 | - useAction
382 | - useSelector
383 | - useEffect
384 |
385 | Correct answer-
386 |
387 | useDispatch
388 |
389 |
390 | #### 35. Which function is called first when a component loads in a class component?
391 | - Constructor
392 | - Componentdidmount
393 | - Componentdidupdate
394 | - Componentwillmount
395 |
396 | Correct answer-
397 |
398 | Constructor
399 |
400 |
401 | #### 36. Which is the correct place to make an api call on screen load in a class component?
402 | - Constructor
403 | - Componentdidmount
404 | - Componentdidupdate
405 | - Componentwillmount
406 |
407 | Correct answer-
408 |
409 | Componentdidmount
410 |
411 |
412 | #### 37. Which flavor of apk should be deployed to the playstore?
413 | - Debug
414 | - Release
415 |
416 | Correct answer-
417 |
418 | Release
419 |
420 |
421 | #### 38. Which is the correct component to build a custom button?
422 | - Button
423 | - TouchableOpacity & Text
424 | - View & Text
425 | - Text
426 |
427 | Correct answer-
428 |
429 | TouchableOpacity & Text
430 |
431 |
432 | #### 39. Which Javascript function is used to loop through an array?
433 | - Map
434 | - Object.keys
435 | - Render
436 | - Var
437 |
438 | Correct answer-
439 |
440 | Map
441 |
442 |
443 | #### 40. Which Javascript function is used to loop through an object?
444 | - Map
445 | - Object.keys
446 | - Render
447 | - Var
448 |
449 | Correct answer-
450 |
451 | Object.keys
452 |
453 |
454 | #### 41. What is the entry point of React native apps?
455 | - Index.js
456 | - App.js
457 | - App.json
458 | - Config.json
459 |
460 | Correct answer-
461 |
462 | Index.js
463 |
464 |
465 | #### 42. Which is a component that can detect various stages of press interactions?
466 | - PressComponent
467 | - Pressable
468 | - TouchHandle
469 | - Touch
470 |
471 | Correct answer-
472 |
473 | Pressable
474 |
475 |
476 | #### 43. Which module in React Native detects the platform in which the app is running?
477 | - Platform
478 | - Engine
479 | - CodeDetect
480 | - View
481 |
482 | Correct answer-
483 |
484 | Platform
485 |
486 |
487 | #### 44. is the correct command to install a react native project?
488 | - npx create-react-app appname
489 | - npx create-react-app init appname
490 | - Npx react-native init appname
491 | - Npx react-native app init
492 |
493 | Correct answer-
494 |
495 | Npx react-native init appname
496 |
497 |
498 | #### 45. Which command is used if the node_modules folder gets deleted?
499 | - Npm install
500 | - Npx react-native init appname
501 | - Gradle update
502 | - Npm update
503 |
504 | Correct answer-
505 |
506 | Npm install
507 |
508 |
509 | #### 46. Which method can be used to get the size of the screen?
510 | - Size.app()
511 | - Dimension
512 | - ScreenSize
513 | - WindowSize
514 |
515 | Correct answer-
516 |
517 | Dimension
518 |
519 |
520 | #### 47. Which property is used to open the screen on an app open in React Navigation?
521 | - initialRouteName
522 | - onAppopen
523 | - startScreen
524 | - startApp
525 |
526 | Correct answer-
527 |
528 | initialRouteName
529 |
530 |
531 | #### 48. Which property is used to hide the header in React Navigation?
532 | - Header: false
533 | - headerShown: false
534 | - hideHeader: false
535 | - noHeader: true
536 |
537 | Correct answer-
538 |
539 | headerShown: false
540 |
541 |
542 | #### 49. Which component is used to render content within the safe area boundaries of a device?
543 | - Safeareaview
544 | - View
545 | - Render
546 | - Safearea
547 |
548 | Correct answer-
549 |
550 | Safeareaview
551 |
552 |
553 | #### 50. Which property is used to limit the number of lines in a Text?
554 | - maxLine
555 | - lineNumber
556 | - fixedLine
557 | - numberOfLines
558 |
559 | Correct answer-
560 |
561 | numberOfLines
562 |
563 |
--------------------------------------------------------------------------------