React Native Developer

100+ React Native Developer Interview Questions and Answers

Updated 10 Dec 2024

Popular Companies

search-icon

Q1. 3. What is the use useEffect Hook in react native? and how you relate it with lifecycle method which is class components?

Ans.

The useEffect Hook in React Native is used to perform side effects in functional components. It is similar to lifecycle methods in class components.

  • useEffect Hook is used to handle side effects in functional components.

  • It is called after the component has rendered and can be used to fetch data, subscribe to events, or update the DOM.

  • It takes two arguments: a function that contains the side effect logic, and an optional array of dependencies.

  • The function passed to useEffect is...read more

Q2. what are hooks and what are the hooks you have used

Ans.

Hooks are functions that allow you to use state and other React features without writing a class.

  • useState() - for managing state in functional components

  • useEffect() - for performing side effects in functional components

  • useContext() - for consuming context in functional components

  • useReducer() - for managing complex state in functional components

  • useCallback() - for memoizing functions in functional components

React Native Developer Interview Questions and Answers for Freshers

illustration image

Q3. Are you familiar with new architecture of React native

Ans.

Yes, I am familiar with the new architecture of React Native.

  • The new architecture of React Native is based on Fabric, a C++ UI framework.

  • It separates the UI rendering from the JavaScript thread, resulting in improved performance.

  • It also introduces new features like TurboModules and JSI for better native module integration.

  • The new architecture is being gradually rolled out in React Native releases.

  • It requires some changes in the codebase, such as using the new TurboModules API...read more

Q4. 1. What is git rebase used for? 2. What is Flipper used for? 3. What is useCallback? Explain with an example. 4. Is "let setState = useState()" valid syntax? How would you set state and print state with this sy...

read more
Ans.

Answers to various technical questions related to React Native development.

  • 1. Git rebase is used to reapply commits on top of another base tip. It is used to maintain a clean and linear project history.

  • 2. Flipper is a mobile debugging tool for iOS and Android apps. It allows developers to inspect and debug their apps in real-time.

  • 3. useCallback is a hook in React that returns a memoized callback function. It is used to optimize performance by preventing unnecessary re-renders...read more

Are these interview questions helpful?

Q5. 7. What is the best practice for calling API's?

Ans.

The best practice for calling APIs is to use asynchronous requests and handle errors properly.

  • Use asynchronous requests to prevent blocking the UI thread.

  • Handle errors properly by checking for response status codes and handling network failures.

  • Implement caching mechanisms to improve performance and reduce unnecessary API calls.

  • Consider using libraries or frameworks like Axios or Fetch for making API requests.

  • Follow RESTful principles and use appropriate HTTP methods for diff...read more

Q6. 5. Have you ever used or know about Redux Thunk or Redux Saga and what is it, How it works?

Ans.

Redux Thunk and Redux Saga are middleware libraries for Redux that allow for asynchronous actions.

  • Redux Thunk is a simple middleware that allows for asynchronous actions by returning a function instead of an action object.

  • Redux Saga is a more powerful middleware that uses generator functions to handle asynchronous actions and allows for more complex control flow.

  • Both libraries are commonly used in React Native applications to manage state and handle asynchronous actions.

  • Redux...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. Have you ever worked on native components

Ans.

Yes, I have worked on native components.

  • I have experience in creating custom native modules for React Native apps.

  • I have integrated native libraries like Firebase, Google Maps, and Camera into React Native apps.

  • I have used native UI components like TextInput, ScrollView, and FlatList in React Native apps.

  • I have also worked with native modules for iOS and Android separately.

Q8. Difference between functional and class based component

Ans.

Functional components are stateless and use functional programming concepts, while class components are stateful and use object-oriented programming concepts.

  • Functional components are simpler and easier to read and test.

  • Class components have access to lifecycle methods and state.

  • Functional components are preferred for simple UI components, while class components are preferred for complex UI components.

  • Functional components can be written as arrow functions, while class compon...read more

React Native Developer Jobs

Lead React Native Developer 5-10 years
Cipla
4.1
Mumbai
React Native Developer 5-8 years
Infosys Limited
3.7
Bangalore / Bengaluru
React Native Developer 3-5 years
Infosys Limited
3.7
Pune

Q9. Difference between class and functional component?

Ans.

Class components are ES6 classes that extend the React.Component class, while functional components are just plain JavaScript functions.

  • Class components are more feature-rich and have access to lifecycle methods.

  • Functional components are simpler and easier to read and test.

  • Class components can have state and use lifecycle methods like componentDidMount and componentDidUpdate.

  • Functional components are stateless and do not have lifecycle methods.

  • Functional components can be use...read more

Q10. What is Redux state management? What is event loop, call back queue and call stack? Difference between let, const, var output questions based on set timeout, this, scoping. Coding question - zigzag string conve...

read more
Ans.

Redux is a predictable state container for JavaScript apps. Event loop, call stack, and callback queue manage asynchronous operations. let, const, var differ in variable scoping and reassignment. setTimeout delays execution. 'this' refers to the current context. Scoping determines variable accessibility.

  • Redux is a state management tool for JavaScript apps, ensuring predictable state changes.

  • Event loop manages the execution of callback functions, while call stack keeps track o...read more

Q11. What is state ,props, redux, asyncstorage,how to upload a build on test flight

Ans.

State, props, Redux, AsyncStorage are key concepts in React Native. Uploading a build on TestFlight involves creating an IPA file and using Xcode.

  • State is used to manage data within a component and can be updated using setState.

  • Props are read-only data passed from parent to child components.

  • Redux is a state management library for managing application state.

  • AsyncStorage is a simple, unencrypted, asynchronous, persistent, key-value storage system.

  • To upload a build on TestFlight...read more

Q12. Redux, what is props, what is hooks in react, Native tools and it's working

Ans.

Answering questions related to Redux, props, hooks in React Native and its tools

  • Redux is a state management library for JavaScript applications

  • Props are short for properties and are used to pass data between components

  • Hooks are functions that allow you to use state and other React features without writing a class

  • React Native tools include Expo, React Native Debugger, and Xcode

  • Expo is a set of tools and services for building and deploying React Native apps

  • React Native Debugger...read more

Q13. What is recat native and diffrence between react and react native

Ans.

React Native is a framework for building mobile apps using JavaScript and React.

  • React Native is based on React, but instead of rendering to the browser, it renders to native components.

  • It allows developers to build mobile apps for iOS and Android using a single codebase.

  • React Native provides a set of pre-built components that can be used to build the UI of the app.

  • It also allows for easy integration with native code when necessary.

  • React Native apps are faster and more respons...read more

Q14. how will you setup push notification to your project?

Ans.

Setting up push notifications involves configuring a push notification service, integrating it with the app, and handling notifications in the code.

  • Choose a push notification service provider like Firebase Cloud Messaging (FCM) or OneSignal.

  • Set up an account with the chosen service provider and obtain necessary credentials (API keys, tokens, etc).

  • Integrate the push notification SDK provided by the service provider into your React Native project.

  • Implement code to handle receiv...read more

Q15. How to upgrade version of an app programatically?

Ans.

To upgrade app version programmatically, use code push or OTA updates.

  • Use code push to update JavaScript code without requiring a new binary

  • Use OTA updates to update the binary itself

  • Ensure the app is properly configured to receive updates

  • Test the update thoroughly before releasing to users

Q16. 6. Which is your highest priority HOC Components?

Ans.

My highest priority HOC components are those that handle authentication and authorization.

  • Authentication HOCs like withAuthenticator and withAuthContext

  • Authorization HOCs like withAuthorization and withRoleBasedAccessControl

  • HOCs that handle user sessions and persistent login state

Q17. How to share data between two components each other

Ans.

Use props to pass data from parent component to child component, and use state to manage shared data between sibling components.

  • Pass data from parent to child components using props

  • Use state management libraries like Redux or Context API to share data between sibling components

  • Use event emitters or callbacks to communicate between components

Q18. 1. What is React Native bridge?

Ans.

React Native bridge is a communication layer between JavaScript code and native code.

  • It allows React Native to interact with native modules written in Objective-C, Java, or Swift.

  • The bridge sends messages between the two environments, allowing for seamless integration.

  • The bridge can also be used to pass data between the two environments.

  • For example, a React Native app might use the bridge to access the device's camera or accelerometer.

  • The bridge can be a performance bottlenec...read more

Q19. 2. What is HOC (Higher order components)?

Ans.

HOC is a function that takes a component and returns a new component with additional functionality.

  • HOC is a design pattern in React.

  • It allows reusing component logic.

  • HOC can be used for cross-cutting concerns like authentication, logging, etc.

  • HOC can be created using a function that takes a component and returns a new component.

  • The new component can render the original component with additional props or wrap it with other components.

  • Example: WithAuth HOC can add authenticatio...read more

Q20. Sort an array, hoc components in react Native and flux in react Native

Ans.

Sorting an array and using HOC components and Flux in React Native

  • To sort an array, use the sort() method

  • To use HOC components, create a higher-order function that returns a component

  • To use Flux in React Native, install the flux package and create actions, stores, and a dispatcher

Q21. How call call stack and event loop is working

Ans.

Call stack is used to keep track of function calls, while event loop manages asynchronous operations in JavaScript.

  • Call stack is a data structure that keeps track of function calls in a program.

  • When a function is called, it is added to the top of the call stack. When the function completes, it is removed from the stack.

  • Event loop is responsible for managing asynchronous operations in JavaScript, ensuring that they are executed in the correct order.

  • Event loop continuously chec...read more

Q22. What is class components and functional components

Ans.

Class components and functional components are two ways to create components in React Native.

  • Class components are created using ES6 class syntax and extend the React.Component class.

  • Functional components are created using JavaScript functions.

  • Class components have a state and lifecycle methods, while functional components do not.

  • Functional components are simpler and easier to test and maintain.

  • Class components are recommended for complex components with state and lifecycle ne...read more

Q23. What is Hooks ? What is redux?

Ans.

Hooks are a feature in React that allow you to use state and other React features in functional components. Redux is a state management library for JavaScript applications.

  • Hooks are functions that let you use React state and lifecycle features in functional components.

  • Hooks provide a way to reuse stateful logic between components.

  • Redux is a predictable state container for JavaScript apps.

  • Redux helps manage the state of an application in a centralized manner.

  • Redux uses a singl...read more

Q24. List down all hooks which you used before?

Ans.

useState, useEffect, useContext, useReducer, useRef

  • useState - for managing state in functional components

  • useEffect - for side effects in functional components

  • useContext - for accessing context in functional components

  • useReducer - for managing complex state logic

  • useRef - for accessing DOM elements or storing mutable values

Q25. What navigations are used in React Native?

Ans.

React Native provides several navigation options, including React Navigation, React Native Navigation, and React Native Router Flux.

  • React Navigation is a popular choice for implementing navigation in React Native apps.

  • React Native Navigation is a native navigation library that offers better performance and smoother transitions.

  • React Native Router Flux is a simple and flexible navigation library that allows for easy navigation and deep linking.

  • Other options include React Nativ...read more

Q26. what is hooks, redux, push notifacvation, javascript basic

Ans.

Hooks, Redux, push notification, JavaScript basics

  • Hooks are a feature in React that allow you to use state and other React features without writing a class

  • Redux is a state management library for JavaScript applications

  • Push notifications are messages that are sent to a user's device from a server or a backend system

  • JavaScript basics include understanding variables, data types, functions, and control flow

Q27. Release process of an app on Play Store and apple store

Ans.

The release process involves preparing the app for submission, testing, uploading to the respective app stores, and managing the release.

  • Prepare the app for submission by ensuring it meets all guidelines and requirements of the app stores.

  • Test the app thoroughly to identify and fix any bugs or issues before release.

  • Upload the app to the Play Store and Apple Store developer consoles.

  • Manage the release by setting up release notes, updating metadata, and monitoring user feedback...read more

Q28. What is redux? Which library use for Navigation?

Ans.

Redux is a predictable state container for JavaScript apps. React Navigation is used for navigation in React Native.

  • Redux is a state management library commonly used with React to manage application state in a predictable way.

  • It helps in maintaining a single source of truth for the state of the entire application.

  • Redux works by having a central store that holds the entire state tree of the application.

  • React Navigation is a library used for navigation in React Native applicati...read more

Q29. What is Hermes engine

Ans.

Hermes is a JavaScript engine optimized for React Native apps.

  • Developed by Facebook to improve app startup time and reduce memory usage.

  • Uses ahead-of-time compilation to convert JavaScript code into bytecode.

  • Supports ES6 syntax and is compatible with most React Native libraries.

  • Can be enabled in React Native projects by adding a single line to the configuration file.

Q30. how to optimized react native application

Ans.

Optimizing a React Native application involves improving performance and reducing resource usage.

  • Use PureComponent and shouldComponentUpdate to prevent unnecessary re-renders

  • Implement virtualized lists for long lists to improve performance

  • Minimize the use of third-party libraries and optimize the ones you do use

  • Use native modules for performance-critical tasks

  • Optimize images and assets for smaller file sizes

Q31. how will you optimize bundle size ?

Ans.

Optimizing bundle size in React Native involves code splitting, tree shaking, lazy loading, and using smaller libraries.

  • Use code splitting to split the code into smaller chunks that can be loaded on demand.

  • Utilize tree shaking to remove unused code from the bundle.

  • Implement lazy loading to only load components when they are needed.

  • Choose smaller libraries or custom solutions over large dependencies to reduce bundle size.

  • Optimize images and assets by compressing them and using...read more

Q32. 8. What are props and how it works?

Ans.

Props are short for properties and are used to pass data from one component to another in React Native.

  • Props are read-only and cannot be modified by the child component.

  • Props are passed down from parent to child component.

  • Props can be any data type, including strings, numbers, objects, and functions.

  • Props are accessed using the 'this.props' syntax in class components and 'props' in functional components.

  • Props can have default values set using defaultProps.

Q33. Explain about hooks and when useRef hook is used

Ans.

Hooks are functions that let you use state and other React features in functional components. useRef hook is used to persist a value between renders without causing a re-render.

  • Hooks are introduced in React 16.8 to allow state and lifecycle features in functional components.

  • useRef hook is used to persist a mutable value that won't trigger a re-render when changed.

  • It is commonly used to access DOM elements or store mutable values in functional components.

  • Example: const inputRe...read more

Q34. What is IIEF where we can use it

Ans.

IIFE stands for Immediately Invoked Function Expression, used for creating a function that is executed immediately after it is defined.

  • IIFE is used to create a private scope for variables to avoid polluting the global scope.

  • It is commonly used in React Native development to encapsulate code and prevent naming conflicts.

  • Example: (function() { console.log('IIFE executed'); })();

Q35. What is redux ? why we need to use this?

Ans.

Redux is a predictable state container for JavaScript apps. It helps manage application state in a more organized and efficient way.

  • Centralized state management

  • Predictable state changes with actions and reducers

  • Easier debugging and testing

  • Helps in scaling and maintaining large applications

  • Example: Storing user authentication state across the app

Q36. How to upload files in a React native application?

Ans.

To upload files in a React Native application, you can use libraries like react-native-document-picker or react-native-fetch-blob.

  • Use a library like react-native-document-picker to allow users to select files from their device.

  • Use a library like react-native-fetch-blob to handle the actual file upload process.

  • Make sure to handle permissions and error cases properly.

  • Consider using a backend server to handle the file uploads and store them.

  • Test the file upload functionality tho...read more

Q37. How to upload the app to both stores

Ans.

To upload the app to both stores, create separate builds for each platform and follow the submission guidelines of each store.

  • Create separate builds for iOS and Android platforms

  • Follow the submission guidelines of the App Store and Google Play Store

  • Submit the builds to each store separately

  • Ensure that the app meets the requirements of each store

Q38. What is Navigation in react native?

Ans.

Navigation in React Native is the process of moving between different screens or views within an app.

  • Navigation allows users to move between different screens or views within an app

  • React Navigation is a popular library used for navigation in React Native

  • Navigation can be implemented using stack, tab, drawer, or switch navigators

  • Navigation can also involve passing data between screens or handling navigation events

Q39. Write a program for function overloading and overriding

Ans.

Function overloading and overriding are ways to create multiple functions with the same name but different parameters or implementations.

  • Function overloading is when multiple functions have the same name but different parameters.

  • Function overriding is when a subclass provides a different implementation of a method that is already defined in its superclass.

  • In JavaScript, function overloading is not directly supported, but can be achieved using conditional statements to check t...read more

Q40. What is means by react ?

Ans.

React is a JavaScript library for building user interfaces.

  • React is used for creating reusable UI components.

  • It uses a virtual DOM for efficient rendering.

  • React allows for declarative programming.

  • It was developed by Facebook and is open source.

  • React Native is a framework for building mobile apps using React.

Q41. Explain the types of thread used in React Native

Ans.

React Native uses two types of threads: UI thread and JavaScript thread.

  • UI thread is responsible for rendering the user interface and handling user interactions.

  • JavaScript thread is responsible for executing JavaScript code and handling business logic.

  • UI thread and JavaScript thread communicate with each other through a bridge.

  • UI thread is a native thread managed by the operating system.

  • JavaScript thread is a separate thread managed by the JavaScript engine.

  • UI thread should n...read more

Q42. How react native works under the hood?

Ans.

React Native works by running JavaScript code on a separate thread and communicating with native modules through a bridge.

  • React Native runs JavaScript code on a separate thread called the JavaScript thread.

  • It communicates with native modules through a bridge, which allows JavaScript to interact with platform-specific APIs.

  • The bridge passes messages between the JavaScript thread and the native modules, enabling seamless communication.

  • React Native uses a virtual DOM to efficien...read more

Q43. How to create a custom hooks?

Ans.

Custom hooks in React Native allow you to reuse stateful logic across multiple components.

  • Create a function that starts with the word 'use' (e.g., 'useCustomHook')

  • Inside the custom hook, define and initialize any state variables or functions you need

  • Return the state variables and functions as an array or object

  • Use the custom hook in any component by calling it and destructuring the returned values

Q44. What are Higher order components?

Ans.

Higher order components are functions that take a component and return a new component with additional functionality.

  • Higher order components allow code reuse and logic sharing between components.

  • They are commonly used for adding props, state, or lifecycle methods to components.

  • Example: withAuth HOC can add authentication logic to a component.

Q45. What is React and React Native?

Ans.

React is a JavaScript library for building user interfaces, while React Native is a framework for building mobile applications using React.

  • React is a JavaScript library developed by Facebook for building user interfaces.

  • React allows developers to create reusable UI components.

  • React Native is a framework that allows developers to build mobile applications using React.

  • React Native enables developers to write code once and deploy it on multiple platforms.

  • React Native uses native...read more

Q46. What are class and functional components

Ans.

Class components are ES6 classes that extend React.Component and have a render method. Functional components are simple functions that return JSX.

  • Class components are created using ES6 classes and have a state property.

  • Functional components are stateless and do not have a state property.

  • Class components can have lifecycle methods like componentDidMount, componentDidUpdate, etc.

  • Functional components are simpler and easier to read compared to class components.

  • Example: Class com...read more

Q47. Difference between == and === in JavaScript

Ans.

The difference between == and === is that == compares values after type coercion while === compares values and types.

  • The double equals (==) operator compares values after type coercion.

  • The triple equals (===) operator compares values and types.

  • Type coercion is the process of converting one data type to another.

  • Type coercion can lead to unexpected results.

  • For example, 1 == '1' is true because the string '1' is coerced to the number 1.

  • However, 1 === '1' is false because the typ...read more

Q48. redux ,why do we use redux

Ans.

Redux is used for managing application state in a predictable and centralized manner.

  • Redux helps in maintaining a single source of truth for the application state.

  • It enables easy debugging and testing of the application.

  • Redux allows for easy sharing of state between components.

  • It also enables time-travel debugging and undo/redo functionality.

  • Redux is particularly useful for large-scale applications with complex data flow.

  • Example: A shopping cart application where the state of...read more

Q49. How do you maintain code quality

Ans.

Code quality is maintained through code reviews, automated testing, coding standards, and continuous integration.

  • Regular code reviews by peers to catch errors and ensure best practices are followed

  • Implementing automated testing to catch bugs early in the development process

  • Enforcing coding standards and guidelines to maintain consistency and readability

  • Utilizing continuous integration tools to automate the build and testing process

Q50. what is redux management

Ans.

Redux management is a state management tool for JavaScript apps, allowing for centralized state management and predictable state changes.

  • Centralized state management for React applications

  • Stores the entire state of the application in a single immutable object

  • State changes are made through actions and reducers

  • Helps in managing complex state logic and data flow in large applications

1
2
3
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10k Interviews
3.7
 • 7.3k Interviews
3.8
 • 5.4k Interviews
3.4
 • 771 Interviews
4.0
 • 750 Interviews
3.6
 • 311 Interviews
4.0
 • 248 Interviews
3.4
 • 73 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

React Native Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter