React Native Interview Questions

React Native Interview questions

Find Top React Native Interview questions

Download React Native Interview questions PDF

Below are the list of Best React Native Interview questions and Answers

React Native is mobile app development platform that allow you to create android and ios apps only using Javascript. React Native uses the same fundamental UI building blocks as regular iOS and Android apps so applications created using React Native are indistinguishable from an app built using Objective-C or Java.
Yes, we can. React Native smoothly combines the components written in Objective-C, Java, or Swift.
Thousands of apps are created using React Native. Here is the list of some popular companies who are using React Native.
  • Facebook
  • Facebook Ads Manager
  • Instagram
  • F8
  • Airbnb
  • Skype
  • Tesla

You know more from https://facebook.github.io/react-native/showcase.html

Also, Read Best React.Js Interview Questions and Answers

Run the following command to Create and start a React Native App.
  • Step 1: npm install -g create-react-native-app // Installs create native app
  • Step 2: create-react-native-app AwesomeProject // Create a project named AwesomeProject
  • Step 3: cd AwesomeProject
  • Step 4: npm start
StyleSheet.create method ensures that values are immutable and opaque, they are also only created once.
XHR Module is used for implementation of XMLHttpRequest to post data on the server.
Text, Image, View, TextInput, ListView are some core components of React Native.
React creates an in-memory data structure cache, computes the resulting differences, and then updates the browser’s displayed DOM efficiently. This allows developers to write code as if the entire page is rendered on each change while the React libraries only render subcomponents that actually change.

Use the following commands to install and create a React Native App

To Install

npm install -g create-react-native-app

To Create Project

create-react-native-app MyReactNative

Flexbox in React Native works in the same way as it does in CSS on the web, with a few exceptions. It is used to provide a consistent layout on different screen sizes.

With react native we can create following types of app:

  • Working prototypes Apps
  • Apps with streamlined UI
  • Cross-platform apps
  • An app without the use of native APIs

FlatList in React Native is a component that displays the content in similarly structured data as a scrollable list. It is used for large lists of data where the number of list items changes over time.

this.props.navigation.navigate() method is used to pass value between screen in React Native.

Syntax:

this.props.navigation.navigate('RouteName', { /* params go here */ })

JavaScriptCore is an open-source Web browser engine which run in WebKit. It helps developers to create own browser.

The gesture responder system manages the lifecycle of gestures in your app. A touch can go through several phases as the app determines what the user's intention is. For example, the app needs to determine if the touch is scrolling, sliding on a widget, or tapping. This can even change during the duration of a touch. There can also be multiple simultaneous touches.

The touch responder system is needed to allow components to negotiate these touch interactions without any additional knowledge about their parent or child components.

Source: https://facebook.github.io/react-native/docs/gesture-responder-system

React Native Platform module is used to detect the platform of device in which the application is running. You can use the below code detect platform in React Native.

import {Platform, StyleSheet} from 'react-native';
const styles = StyleSheet.create({
  height: Platform.OS === 'ios' ? 200 : 100,
});

React Native implements the browser timers functions. Below are few Timers function that can be used

  • setTimeout, clearTimeout
  • setInterval, clearInterval
  • setImmediate, clearImmediate
  • requestAnimationFrame, cancelAnimationFrame