Skip to content

jyotishman/React-native-interview-questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

MCQ React Native Interview Questions and Answers

1. Which of these React native components will be used to display the name="React Native Tutorial"?

  • View
  • Text
  • span
  • p
Correct Answer-
<Text>

2. Which of the following components is the optimized way to show a long list of data?

  • View
  • Scrollview
  • Safeareaview
  • Flatlist
Correct Answer-
<Flatlist>

3. How do you style your React Native component?

  • Stylesheet.create
  • Stylesheet.css
  • Safeareaview
  • Flatlist
Correct Answer-
Stylesheet.create

4. Which of the following is the correct plugin to navigate from one screen to another?

  • React Hooks
  • React Navigation
  • React Router
  • Screen
Correct Answer-
React Navigation

5. Which of the following is the correct way to render a webpage.

	Eg. render the homepage of https://www.amazon.com/ in React Native ?
  • React Native webview
  • React Native HTML
  • View
  • ScrollView
Correct Answer-
React Native webview

6. Which of the following is the correct method(hook) to make an api call on page load?

  • useState
  • useEffect
  • useReducer
  • useSelector
Correct Answer-
useEffect

7. Which of the following is used to make sure that your input fields don't hide behind the keyboard?

  • Keyboardavoidingview
  • Keyboardview
  • View
  • Scrollview
Correct Answer-
Keyboardavoidingview

8. Which of the following is used to color the status bar of the app in android?

Correct Answer-
<StatusBar/>

9. What is the use case of ActivityIndicator in React Native?

  • To display a circular loading activity
  • To display a progress bar activity
  • To open the app
  • To exit the app
Correct Answer-
To display a circular loading activity

9. What is the use case of ActivityIndicator in React Native?

  • To display a circular loading activity
  • To display a progress bar activity
  • To open the app
  • To exit the app
Correct answer-
To display a circular loading activity

10. How do we detect platforms in React Native?

  • Platform.OS
  • Phone.OS
  • Dimension.OS
  • RN.OS
Correct answer-
Platform.OS

11. Which of the following is the correct way to store data in a local device?

  • Asyncstorage
  • Localstorage
  • Sessionstorage
  • RNStorage
Correct answer-
Asyncstorage

12. Which of the following comes under dangerous permission in Android?

  • Read SMS
  • Ask Location
  • Show notification
  • Internet access
Correct answer-
Read SMS

13. What is the correct way to read SMS for OTP?

  • Ask for sms read permission
  • Use the SMS retriever api
  • Use firebase
  • Ask of location permission
Correct answer-
Ask for sms read permission

14. Which of the following is not a valid event listener?

  • onClick
  • onChange
  • onType
  • onPress
Correct answer-
onType

15. Which of the following is not a valid component in React Native?

Correct answer-
<Div/>

16. Which of the following React Native components we cannot style?

Correct answer-
<Button/>

17. Which of the following properties is used to change the direction of row/columns?

  • Flexdirection
  • Justifycontent
  • Alignitems
  • Flex
Correct answer-
Flexdirection

18. Which of the following components is used to make an input field in React Native?

  • input
  • TextInput
  • EditInput
  • InputText
Correct answer-
<TextInput/>

19. Which of the following components is used to show an image in React Native?

  • <Image source={{uri: "url of image"}} />
  • <images src={"url of image"}/>
Correct answer-
<Image source={{uri: "url of image"}} />

20. Which of the following software/technology is necessary to run/develop RN apps locally?

  • Node JS
  • jQuery
  • React JS
  • CSS
Correct answer-
Node JS

21. Which of the following is not a part of the React Native Library?

  • Async Storage
  • ActivityIndicator
  • Stylesheet
  • Pressable
Correct answer-
Async Storage

22. What is the result we receive once we have the location permission access?

  • Both Latitude and longitude
  • Readable address
  • Only Latitude
  • Only Longitude
Correct answer-
Both Latitude and longitude

23. What is the correct property to set the size of a Text?

  • textSize
  • fontSize
  • fontStyle
  • font-size
Correct answer-
fontSize

24. What is the correct property to set the background color of a view?

  • bgColor
  • background
  • backgroundColor
  • backgroundStyle
Correct answer-
backgroundColor

25. React native is a framework developed by?

  • Facebook
  • Google
  • Microsoft
  • Amazon
Correct answer-
Facebook

26. What is the command to start a RN project on an Android device?

  • Npm run android
  • Npm run ios
  • Npm install
  • Npm android
Correct answer-
Npm run android

27. Which of the following is not the correct way to make an api request?

  • Axios.get(“url”)
  • fetch(“url”)
  • import(“url”)
  • XMLHttpRequest
Correct answer-
import(“url”)

28. Which of the following commands is used to navigate from one screen to another in RN?

  • navigation.navigate(“”)
  • Window.location.href
  • Location.href
  • Linking
Correct answer-
navigation.navigate(“”)

29. Which of the following properties is used in React Navigation to directly open the screen on the first app open?

  • initialRouteName
  • startScreen
  • Open
  • Start
Correct answer-
initialRouteName

30. What is the event listener attached to an input component to fetch the value?

  • onType
  • onChange
  • onClick
  • onPress
Correct answer-
onChange

31. What is the recommendation of releasing an app to google play store?

  • Bundle
  • Apk
Correct answer-
Bundle

32. Name the Hook that is used to change state in React Native?

  • useState
  • useDispatch
  • useSelector
  • useChange
Correct answer-
useState

33. Name the Hook that is used to fetch data from the store in Redux?

  • useSelector
  • useDispatch
  • useValue
  • useData
Correct answer-
useSelector

34. Name the Hook that is used to dispatch an action in Redux?

  • useDispatch
  • useAction
  • useSelector
  • useEffect
Correct answer-
useDispatch

35. Which function is called first when a component loads in a class component?

  • Constructor
  • Componentdidmount
  • Componentdidupdate
  • Componentwillmount
Correct answer-
Constructor

36. Which is the correct place to make an api call on screen load in a class component?

  • Constructor
  • Componentdidmount
  • Componentdidupdate
  • Componentwillmount
Correct answer-
Componentdidmount

37. Which flavor of apk should be deployed to the playstore?

  • Debug
  • Release
Correct answer-
Release

38. Which is the correct component to build a custom button?

  • Button
  • TouchableOpacity & Text
  • View & Text
  • Text
Correct answer-
TouchableOpacity & Text

39. Which Javascript function is used to loop through an array?

  • Map
  • Object.keys
  • Render
  • Var
Correct answer-
Map

40. Which Javascript function is used to loop through an object?

  • Map
  • Object.keys
  • Render
  • Var
Correct answer-
Object.keys

41. What is the entry point of React native apps?

  • Index.js
  • App.js
  • App.json
  • Config.json
Correct answer-
Index.js

42. Which is a component that can detect various stages of press interactions?

  • PressComponent
  • Pressable
  • TouchHandle
  • Touch
Correct answer-
Pressable

43. Which module in React Native detects the platform in which the app is running?

  • Platform
  • Engine
  • CodeDetect
  • View
Correct answer-
Platform

44. is the correct command to install a react native project?

  • npx create-react-app appname
  • npx create-react-app init appname
  • Npx react-native init appname
  • Npx react-native app init
Correct answer-
Npx react-native init appname

45. Which command is used if the node_modules folder gets deleted?

  • Npm install
  • Npx react-native init appname
  • Gradle update
  • Npm update
Correct answer-
Npm install

46. Which method can be used to get the size of the screen?

  • Size.app()
  • Dimension
  • ScreenSize
  • WindowSize
Correct answer-
Dimension

47. Which property is used to open the screen on an app open in React Navigation?

  • initialRouteName
  • onAppopen
  • startScreen
  • startApp
Correct answer-
initialRouteName

48. Which property is used to hide the header in React Navigation?

  • Header: false
  • headerShown: false
  • hideHeader: false
  • noHeader: true
Correct answer-
headerShown: false

49. Which component is used to render content within the safe area boundaries of a device?

  • Safeareaview
  • View
  • Render
  • Safearea
Correct answer-
Safeareaview

50. Which property is used to limit the number of lines in a Text?

  • maxLine
  • lineNumber
  • fixedLine
  • numberOfLines
Correct answer-
numberOfLines

About

React Native Interview questions and answer mcq

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published