{"id":3440,"date":"2023-12-27T10:27:13","date_gmt":"2023-12-27T10:27:13","guid":{"rendered":"https:\/\/www.kaashivinfotech.com\/blog\/?p=3440"},"modified":"2025-07-31T10:12:08","modified_gmt":"2025-07-31T10:12:08","slug":"intermediate-react-native-interview-questions-answers","status":"publish","type":"post","link":"https:\/\/www.kaashivinfotech.com\/blog\/intermediate-react-native-interview-questions-answers\/","title":{"rendered":"Intermediate React Native  Interview Questions &#038; Answers"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p data-start=\"206\" data-end=\"476\"><strong data-start=\"206\" data-end=\"222\">React Native<\/strong> (also known as RN) is a popular <strong data-start=\"255\" data-end=\"296\">JavaScript-based mobile app framework<\/strong> that allows developers to build natively-rendered mobile apps for <strong data-start=\"363\" data-end=\"382\">iOS and Android<\/strong>. The biggest appeal? You can use a <strong data-start=\"418\" data-end=\"437\">single codebase<\/strong> to create cross-platform applications.<\/p>\n<p data-start=\"478\" data-end=\"646\"><a href=\"https:\/\/www.wikitechy.com\/interview-questions\/category\/reactjs\/\" target=\"_blank\" rel=\"noopener\"><strong data-start=\"478\" data-end=\"520\">React intermediate interview questions<\/strong><\/a> often focus on the key features and architectural decisions that make React Native stand out in the mobile development space.<\/p>\n<h4 data-start=\"653\" data-end=\"692\">Why Is React Native So Popular?<\/h4>\n<p data-start=\"694\" data-end=\"964\">Released by <strong data-start=\"706\" data-end=\"718\">Facebook<\/strong> as an open-source project in 2015, React Native quickly gained traction and has become a go-to choice for mobile app development. Today, it powers apps used by <strong data-start=\"879\" data-end=\"900\">millions of users<\/strong> globally, including <strong data-start=\"921\" data-end=\"934\">Instagram<\/strong>, <strong data-start=\"936\" data-end=\"948\">Facebook<\/strong>, and <strong data-start=\"954\" data-end=\"963\">Skype<\/strong>.<\/p>\n<p data-start=\"966\" data-end=\"1026\">The rise in popularity can be attributed to several factors:<\/p>\n<ul data-start=\"1028\" data-end=\"1521\">\n<li data-start=\"1028\" data-end=\"1175\">\n<p data-start=\"1030\" data-end=\"1175\"><strong data-start=\"1033\" data-end=\"1053\">Code Reusability<\/strong>: Write once, deploy on both iOS and Android. This saves developers and companies a <strong data-start=\"1137\" data-end=\"1174\">huge amount of time and resources<\/strong>.<\/p>\n<\/li>\n<li data-start=\"1176\" data-end=\"1320\">\n<p data-start=\"1178\" data-end=\"1320\"><strong data-start=\"1181\" data-end=\"1204\">Familiar Foundation<\/strong>: Built on top of <strong data-start=\"1222\" data-end=\"1231\">React<\/strong>\u2014a widely used JavaScript library\u2014React Native was instantly familiar to many developers.<\/p>\n<\/li>\n<li data-start=\"1321\" data-end=\"1521\">\n<p data-start=\"1323\" data-end=\"1521\"><strong data-start=\"1326\" data-end=\"1359\">Empowered Frontend Developers<\/strong>: React Native enabled frontend web developers to start building <strong data-start=\"1424\" data-end=\"1456\">production-ready mobile apps<\/strong> without learning native iOS or Android development from scratch.<\/p>\n<\/li>\n<\/ul>\n<h4 data-start=\"1528\" data-end=\"1590\">The Origin Story: React Native\u2019s Accidental Innovation<\/h4>\n<p data-start=\"1592\" data-end=\"1825\">Like many game-changing technologies, React Native was born from a need to fix a major internal issue at Facebook. What started as a solution to a problem turned into one of the most <strong data-start=\"1775\" data-end=\"1824\">revolutionary tools in mobile app development<\/strong>.<\/p>\n<h3 data-start=\"1832\" data-end=\"1892\">Preparing with Intermediate React Interview Questions<\/h3>\n<p data-start=\"1894\" data-end=\"2049\">If you&#8217;re preparing for a job or technical interview, focusing on <strong data-start=\"1960\" data-end=\"2002\">intermediate react interview questions<\/strong> is crucial. These often dive into topics like:<\/p>\n<ul data-start=\"2051\" data-end=\"2333\">\n<li data-start=\"2051\" data-end=\"2090\">\n<p data-start=\"2053\" data-end=\"2090\">Navigation using <strong data-start=\"2070\" data-end=\"2090\">React Navigation<\/strong><\/p>\n<\/li>\n<li data-start=\"2091\" data-end=\"2144\">\n<p data-start=\"2093\" data-end=\"2144\">Efficient <strong data-start=\"2103\" data-end=\"2123\">State Management<\/strong> (Redux, Context API)<\/p>\n<\/li>\n<li data-start=\"2145\" data-end=\"2195\">\n<p data-start=\"2147\" data-end=\"2195\"><strong data-start=\"2147\" data-end=\"2175\">Performance Optimization<\/strong> in large-scale apps<\/p>\n<\/li>\n<li data-start=\"2196\" data-end=\"2267\">\n<p data-start=\"2198\" data-end=\"2267\">Managing <strong data-start=\"2207\" data-end=\"2234\">asynchronous operations<\/strong> with <code class=\"\" data-line=\"\">async\/await<\/code> or Redux Saga<\/p>\n<\/li>\n<li data-start=\"2268\" data-end=\"2333\">\n<p data-start=\"2270\" data-end=\"2333\">Understanding the <strong data-start=\"2288\" data-end=\"2298\">bridge<\/strong> between JavaScript and native code<\/p>\n<\/li>\n<\/ul>\n<h2>Top 15+ Intermediate React Native Interview Questions<\/h2>\n<figure id=\"attachment_9646\" aria-describedby=\"caption-attachment-9646\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\" wp-image-9646\" src=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions.png\" alt=\"react intermediate interview questions\" width=\"750\" height=\"500\" srcset=\"https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions.png 1536w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-300x200.png 300w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-1024x683.png 1024w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-768x512.png 768w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-332x221.png 332w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-664x443.png 664w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-688x459.png 688w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-1044x696.png 1044w, https:\/\/www.kaashivinfotech.com\/blog\/wp-content\/uploads\/2023\/12\/Top-15-Intermediate-React-Native-Interview-Questions-1400x933.png 1400w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption id=\"caption-attachment-9646\" class=\"wp-caption-text\">Top 15+ Intermediate React Native Interview Questions<\/figcaption><\/figure>\n<p><a tabindex=\"0\">1. How is the entire React Native code processed to show the final output on a mobile screen ?<\/a><\/p>\n<ul>\n<li>At the first start of the app, the main thread starts execution and starts loading JS bundles.<\/li>\n<li>When JavaScript code has been loaded successfully, the main thread sends it to another JS thread because when JS does some heavy calculations stuff the thread for a while, the UI thread will not suffer at all times.<\/li>\n<li>When React starts rendering, Reconciler starts \u201cdiffing\u201d, and when it generates a new virtual DOM(layout) it sends changes to another thread(Shadow thread).<\/li>\n<li>Shadow thread calculates layout and then sends layout parameters\/objects to the main(UI) thread. ( Here you may wonder why we call it \u201cshadow\u201d? It\u2019s because it generates shadow nodes )<\/li>\n<li>Since only the main thread is able to render something on the screen, the shadow thread should send the generated layout to the main thread, and only then UI renders.<\/li>\n<\/ul>\n<p data-start=\"1162\" data-end=\"1313\">These are important <strong data-start=\"1182\" data-end=\"1224\">react intermediate interview questions<\/strong> that test your understanding of the React Native threading model and rendering pipeline.<\/p>\n<p><a tabindex=\"0\">2. What is a bridge and why is it used in React Native ? Explain for both android and IOS ?<\/a><\/p>\n<p>Bridge in ReactNative is a layer or simply a connection that is responsible for gluing<br \/>\ntogether Native and JavaScript environments.<\/p>\n<ul>\n<li>The layer which is closest to the device on which the application runs is the Native Layer.<\/li>\n<\/ul>\n<p>The bridge is basically a transport layer which acts as a connection between Javascript and Native modules, it does the work of transporting asynchronous serialized batched response messages from JavaScript to Native modules.<\/p>\n<p>Now for an example, there is some state change that happens, because of which React Native will batch Update UI and send it to the Bridge. The bridge will pass this Serialized batched response to the Native layer, which will process all commands that it can distinguish from a serialized batched response and will update the User Interface accordingly.<\/p>\n<p>Understanding the <strong data-start=\"1853\" data-end=\"1863\">Bridge<\/strong> is often part of <strong data-start=\"1881\" data-end=\"1923\">intermediate react interview questions<\/strong> because it highlights performance implications and native interactions.<\/p>\n<p><a tabindex=\"0\">3. How do you create a basic button in React Native ?<\/a><\/p>\n<p style=\"line-height: 21.0pt; background: white; vertical-align: baseline; margin: 0in 0in .25in 0in;\">We can create basic buttons using the following syntax: &lt;import { View, Button, StyleSheet } from \u201creact-native\u201d&gt;. Basic buttons support a minimal level of customization and can be modified using TouchableOpacity or TouchableWithoutFeedback.<\/p>\n<p><a tabindex=\"0\">4. What is ListView and describe its use in React Native ?<\/a><\/p>\n<p><strong data-start=\"2329\" data-end=\"2341\">ListView<\/strong> is a component for displaying vertically scrollable lists of changing data. Though now deprecated in favor of <code class=\"\" data-line=\"\">FlatList<\/code>, it&#8217;s still asked in <strong data-start=\"2484\" data-end=\"2529\">react js intermediate interview questions<\/strong>.<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">export default class MyListComponent extends Component {  \nconstructor() {  \nsuper();  \nconst ds = new ListView.DataSource({rowHasChanged: (r1, r2) =&gt; r1 !== r2});  \nthis.state = {  \ndataSource: ds.cloneWithRows([&#039;Android&#039;,&#039;iOS&#039;, &#039;Java&#039;,&#039;Php&#039;, &#039;Hadoop&#039;, &#039;Sap&#039;, &#039;Python&#039;,&#039;Ajax&#039;, &#039;C++&#039;]), \n};\n}  \nrender() {  \nreturn ( \n&lt;ListView \ndataSource={this.state.dataSource}  \nrenderRow={  \n(rowData) =&gt;  \n&lt;Text style={{fontSize: 30}}&gt;{rowData}&lt;\/Text&gt;} \/&gt;  \n); }  \n}<\/code><\/pre>\n<p><a tabindex=\"0\">5. How can you write different code for IOS and Android in the same code base ? Is there any module available for this ?<\/a><\/p>\n<p>The platform module detects the platform in which the app is running.<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import { Platform, Stylesheet } from &#039;react-native&#039;;\nconst styles = Stylesheet.create({\nheight: Platform.OS === &#039;IOS&#039; ? 200 : 400\n})<\/code><\/pre>\n<p>Additionally Platform.select method available that takes an object containing Platform.OS as keys and returns the value for the platform you are currently on.<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import { Platform, StyleSheet } from &#039;react-native&#039;;\nconst styles = StyleSheet.create({\n container: {\nflex: 1,\n   ...Platform.select({\n     ios: {\n       backgroundColor: &#039;red&#039;,\n     },\n     android: {\n       backgroundColor: &#039;green&#039;,\n     },\n     default: {\n       \/\/ other platforms, web for example\n       backgroundColor: &#039;blue&#039;,\n     },    }),\n},\n});<\/code><\/pre>\n<p data-start=\"2725\" data-end=\"2889\">Or use <code class=\"\" data-line=\"\">Platform.select()<\/code> for cleaner logic. This ensures platform-specific behavior in one codebase\u2014a popular topic in <strong data-start=\"2846\" data-end=\"2888\">react intermediate interview questions<\/strong>.<\/p>\n<p><a tabindex=\"0\">6. What are Touchable components in react Native and which one to use when ?<\/a><\/p>\n<p>Tapping gestures can be captured by Touchable components and can display feedback when a gesture is recognized.<\/p>\n<p>Depending on what kind of feedback you want to provide we choose Touchable Components.<\/p>\n<p>Generally, we use TouchableHighlight anywhere you would use a button or link on the web. The background of the view will be darkened when the user presses down on the button.<\/p>\n<p>We can use TouchableNativeFeedback on Android to display ink surface reaction ripples that respond to the user\u2019s touch.<\/p>\n<p>TouchableOpacity can be used to provide feedback by reducing the opacity of the button, allowing the background to be seen through while the user is pressing down.<\/p>\n<p>If we need to handle a tap gesture but you don\u2019t want any feedback to be displayed, use TouchableWithoutFeedback.<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import React, { Component } from &#039;react&#039;;\nimport { Platform, StyleSheet, Text, TouchableHighlight, TouchableOpacity, TouchableNativeFeedback, TouchableWithoutFeedback, View } from &#039;react-native&#039;;\nexport default class Touchables extends Component {\n_onPressButton() {\n   alert(&#039;You tapped the button!&#039;)  }\n _onLongPressButton() {\n   alert(&#039;You long-pressed the button!&#039;)\n }\nrender() {\nreturn (\n&lt;View style={styles.container}&gt;\n&lt;TouchableHighlight onPress={this._onPressButton} underlayColor=&quot;white&quot;&gt;\n&lt;View style={styles.button}&gt;\n&lt;Text style={styles.buttonText}&gt;TouchableHighlight&lt;\/Text&gt;\n&lt;\/View&gt;\n&lt;\/TouchableHighlight&gt;\n);}\n}<\/code><\/pre>\n<p><a tabindex=\"0\">7. Explain FlatList components, what are its key features along with a code sample ?<\/a><\/p>\n<p><strong data-start=\"3237\" data-end=\"3249\">FlatList<\/strong> is preferred for rendering large data sets efficiently by only rendering items visible on screen. It\u2019s a common question in <strong data-start=\"3374\" data-end=\"3416\">intermediate react interview questions<\/strong>.<\/p>\n<p><strong>Key Feature:<\/strong><\/p>\n<p>The FlatList shows only those rendered elements which are currently displaying on the screen, not all the elements of the list at once.<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import React, { Component } from &#039;react&#039;;  \nimport { AppRegistry, FlatList,  \n   StyleSheet, Text, View,Alert } from &#039;react-native&#039;;  \n\nexport default class FlatListBasics extends Component {  \n \n   renderSeparator = () =&gt; {  \n       return (  \n           &lt;View  \n               style={{  \n                   height: 1,  \n                   width: &quot;100%&quot;,  \n                   backgroundColor: &quot;#000&quot;,  \n               }}  \n           \/&gt;  \n       );  \n   };  \n   \/\/handling onPress action  \n   getListViewItem = (item) =&gt; {  \n       Alert.alert(item.key);  \n   }  \n \n   render() {  \n       return (  \n           &lt;View style={styles.container}&gt;  \n               &lt;FlatList  \n                   data={[  \n                       {key: &#039;Android&#039;},{key: &#039;iOS&#039;}, {key: &#039;Java&#039;},{key: &#039;Swift&#039;},  \n                       {key: &#039;Php&#039;},{key: &#039;Hadoop&#039;},{key: &#039;Sap&#039;},  \n                   ]}  \n                   renderItem={({item}) =&gt;  \n                       &lt;Text style={styles.item}  \n                             onPress={this.getListViewItem.bind(this, item)}&gt;{item.key}&lt;\/Text&gt;}  \n                   ItemSeparatorComponent={this.renderSeparator}  \n               \/&gt;  \n           &lt;\/View&gt;  \n       );  \n   }  \n}  \nAppRegistry.registerComponent(&#039;AwesomeProject&#039;, () =&gt; FlatListBasics);  <\/code><\/pre>\n<p><a tabindex=\"0\">8. How To Use Routing with React Navigation in React Native ?<\/a><\/p>\n<p>One of the popular libraries for routing and navigation in a React Native application is React Navigation.<\/p>\n<p>This library helps solve the problem of navigating between multiple screens and sharing data between them.<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import * as React from &#039;react&#039;;\nimport { NavigationContainer } from &#039;@react-navigation\/native&#039;;\nimport { createStackNavigator } from &#039;@react-navigation\/stack&#039;;\n\nconst Stack = createStackNavigator();\n\nconst MyStack = () =&gt; {\n return (\n   &lt;NavigationContainer&gt;\n     &lt;Stack.Navigator&gt;\n       &lt;Stack.Screen\n         name=&quot;Home&quot;\n         component={HomeScreen}\n         options={{ title: &#039;Welcome&#039; }}\n       \/&gt;\n       &lt;Stack.Screen name=&quot;Profile&quot; component={ProfileScreen} \/&gt;\n     &lt;\/Stack.Navigator&gt;\n   &lt;\/NavigationContainer&gt;\n );\n};<\/code><\/pre>\n<p><a tabindex=\"0\">9. What are the Different Ways to style React Native Application ?<\/a><\/p>\n<p>React Native give us two powerful ways by default to style our application :<\/p>\n<p><strong>1 ) Style props<\/strong><\/p>\n<p>You can add styling to your component using style props. You simply add style props to your element and it accepts an object of properties.<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import React, {Component} from &#039;react&#039;;\nimport {Platform, StyleSheet, Text, View} from &#039;react-native&#039;;\nexport default class App extends Component&lt;Props&gt; {\nrender() {\nreturn (\n&lt;View style={{flex:1,justifyContent:&quot;center&quot;,backgroundColor:&quot;#fff&quot;, alignItems:&quot;center&quot;}}&gt;\n&lt;View style={{width:200,height:150,backgroundColor:&quot;red&quot;,padding:10}}&gt;\n&lt;Text style={{fontSize:20, color:&quot;#666&quot;}}&gt;Styled with style props&lt;\/Text&gt;\n&lt;\/View&gt;\n&lt;\/View&gt;\n);\n}\n}<\/code><\/pre>\n<p><strong>\u00a02 ) \u00a0Using StyleSheet<\/strong><\/p>\n<p>For an extremely \u00a0large codebase or you want to set many properties to your elements, writing our styling rules directly inside style props will make our code more complex that\u2019s why React Native give us another way that let us write a concise code using the StyleSheet method:<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import { StyleSheet} from &#039;react-native&#039;;\nconst styles = StyleSheet.create({\ncontainer: {\nflex:1,\njustifyContent:&quot;center&quot;,\nbackgroundColor:&quot;#fff&quot;,\nalignItems:&quot;stretch&quot;\n},\ntitle: {\nfontSize:20,\ncolor:&quot;#fff&quot;\n},\nitem1: {\nbackgroundColor:&quot;orange&quot;,\nflex:1\n},\nitem2: {\nbackgroundColor:&quot;purple&quot;,\nflex:1\n},\nitem3: {\nbackgroundColor:&quot;yellow&quot;,\nflex:1\n},\n\n});<\/code><\/pre>\n<p>We then \u00a0pass the styles object to our component via the style props:<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">&lt;View style={styles.container}&gt;\n&lt;View style={styles.item1}&gt;\n&lt;Text style={{fontSize:20, color:&quot;#fff&quot;}}&gt;Item number 1&lt;\/Text&gt;\n&lt;\/View&gt;\n&lt;View style={styles.item2}&gt;\n&lt;Text style={{fontSize:20, color:&quot;#fff&quot;}}&gt;Item number 1&lt;\/Text&gt;\n&lt;\/View&gt;\n&lt;View style={styles.item3}&gt;\n&lt;Text style={{fontSize:20, color:&quot;#fff&quot;}}&gt;Item number 1&lt;\/Text&gt;\n&lt;\/View&gt;\n&lt;View style={styles.item4}&gt;\n&lt;Text style={{fontSize:20, color:&quot;#fff&quot;}}&gt;Item number 1&lt;\/Text&gt;\n&lt;\/View&gt;\n&lt;\/View&gt;<\/code><\/pre>\n<p><strong>3 ) styled-components in React Native<\/strong><\/p>\n<p>We can also use styled-components with React native so you can write your styles in React Native as you write normal CSS. It is very easy to include it in your project and it doesn\u2019t need any linking just run this following command inside the root directory of your app to install it:<\/p>\n<p>yarn add styled-components<\/p>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">import React, {Component} from &#039;react&#039;;\nimport { StyleSheet,Text, View} from &#039;react-native&#039;;\nimport styled from &#039;styled-components&#039;\nconst Container=styled.View`\n   flex:1;\n   padding:50px 0;\n   justify-content:center;\n   background-color:#f4f4f4;\n   align-items:center\n`\nconst Title=styled.Text`\nfont-size:20px;\ntext-align:center;\ncolor:red;\n`\nconst Item=styled.View`\nflex:1;\nborder:1px solid #ccc;\nmargin:2px 0;\nborder-radius:10px;\nbox-shadow:0 0 10px #ccc;\nbackground-color:#fff;\nwidth:80%;\npadding:10px;\n\n`\n\nexport default class App extends Component {\n render() {\n   return (\n     &lt;Container&gt;\n            &lt;Item &gt;\n            &lt;Title &gt;Item number 1&lt;\/Title&gt;\n            &lt;\/Item&gt;\n            &lt;Item &gt;\n            &lt;Title &gt;Item number 2&lt;\/Title&gt;\n            &lt;\/Item&gt;\n            &lt;Item &gt;\n            &lt;Title &gt;Item number 3&lt;\/Title&gt;\n            &lt;\/Item&gt;\n            &lt;Item &gt;\n            &lt;Title &gt;Item number  4&lt;\/Title&gt;\n            &lt;\/Item&gt;\n     &lt;\/Container&gt;\n   );\n }<\/code><\/pre>\n<p><a tabindex=\"0\">10. Explain Async Storage in React Native and also define when to use it and when to not?<\/a><\/p>\n<ul>\n<li>Async Storage is the React Native equivalent of Local Storage from the web.<\/li>\n<li>Async Storage is a community-maintained module for React Native that provides an asynchronous, unencrypted, key-value store. Async Storage is not shared between apps: every app has its own sandbox environment and has no access to data from other apps.<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<td><strong>DO USE ASYNC STORAGE WHEN..<\/strong><\/td>\n<td><strong>DON\u2019T USE ASYNC STORAGE FOR..<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Persisting non-sensitive data across app runs<\/td>\n<td>Token storage<\/td>\n<\/tr>\n<tr>\n<td>Persisting Redux state<\/td>\n<td>Secrets<\/td>\n<\/tr>\n<tr>\n<td>Persisting GraphQL state<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Storing global app-wide variables<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a tabindex=\"0\">11. What are the core React Components and what do they do ?<\/a><\/p>\n<p>The core React components include:<\/p>\n<ul>\n<li><strong>Props<\/strong>: You can use props to pass data to different React components. Props are immutable, which means props can\u2019t change their values.<\/li>\n<li><strong>ScrollView<\/strong>: ScrollView is a scrolling container that\u2019s used to host multiple views. You can use it to render large lists or content.<\/li>\n<li><strong>States<\/strong>: You use states to control components. The state is mutable in React, meaning that it can change the value at any time.<\/li>\n<li><strong>Style<\/strong>: React Native doesn\u2019t require any special syntax for styling. It uses the JavaScript object.<\/li>\n<li><strong>Text<\/strong>: The text components display text in your application. It uses\u00a0textInput\u00a0to take input from the user.<\/li>\n<li><strong>View<\/strong>: View is used to build the UI for mobile applications. It\u2019s a place where you can display your content.<\/li>\n<\/ul>\n<p><a tabindex=\"0\">12. How mobile app development with React Native is different than web app development with ReactJS ?<\/a><\/p>\n<p>ReactJS and React native, both are developed and open sourced by Facebook Inc. React native framework follows the React JS framework\u2019s basic architecture. React native also promotes a component-based approach to build mobile screens. All the React natives possess similar lifecycle methods which are exposed by React js component. But still, there are a few differences between ReactJS and React Native<\/p>\n<ol>\n<li>We use div, span etc. HTML tags to build the UI of the web application but in case of React Native, we use View, Text imported from React Native library.<\/li>\n<li>Since React Native is used to developing for Native platform, we can\u2019t access the browser features like window object, local storage etc\u2026<\/li>\n<li>React JS and React native are two different open source project on Github.<\/li>\n<li>Any new feature related to component architecture first implement by ReactJS and then support is added in React Native framework.<\/li>\n<li>Both have different tooling for getting started with development.<\/li>\n<\/ol>\n<p>React native comes with static type checking tooling enabled by default but you need to perform few steps to enable flow static type checking in React project.<\/p>\n<p>This is one of the most frequently asked React Native interview questions for freshers in recent times. Understand how to bring out their difference in the most concise manner.<\/p>\n<p><a tabindex=\"0\">13. How does justifyContent flexBox property work?<\/a><\/p>\n<p>JustifyContent property aligns the flexible container\u2019s items when the items do not use all available space on the main axis. By default, the main axis is a vertical axis in case of React native. Which means justifyContent property aligns child elements of flex parent vertically in React native. \u00a0We can use this property to layout elements in a flex container. JustifyContent supports the following values: flex-start|flex-end|centre|space-between|space-around|initial|inherit; It also apply some control over the alignment of items when they overflow the line. Let me explain JustifyContent\u2019s values:<\/p>\n<ul>\n<li><strong>flex-start:\u00a0<\/strong>this is the default value for justifyContent. It means that flex items will start from the top and evenly distributed vertically.<\/li>\n<li><strong>Flex-end:<\/strong>\u00a0this is just the opposite behaviour of flex-start. Elements start rendering from the bottom<\/li>\n<li><strong>Center:<\/strong>\u00a0Items will be placed in the middle<\/li>\n<li><strong>Space-between:\u00a0<\/strong>elements are evenly distributed along the main axis (vertical axis)<\/li>\n<li><strong>Space-around:\u00a0<\/strong>flex items will be evenly distributed with equal space around them<\/li>\n<\/ul>\n<p><a tabindex=\"0\">14. What are the ways to write react components ?<\/a><\/p>\n<p>here are two ways of writing a react component<\/p>\n<ul>\n<li>Functional component\n<ul>\n<li>It uses a simple function which returns the JSX<\/li>\n<\/ul>\n<\/li>\n<li>Class-based component\n<ul>\n<li>It used the class keyword introduced in ES6. it implements render lifecycle method which returns the JSX.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<pre data-start=\"1\" data-line-offset=\"0\"><code class=\"\" data-line=\"\">\/* Class based component *\/\nimport React, { Component } from &#039;react&#039;;\nimport { Text } from &#039;react-native&#039;;\n\nexport default class Greeting extends Component {\n    render() {\n        return (\n            &lt;Text&gt;Hello {this.props.name} !&lt;\/Text&gt;\n        );\n    }\n}\n\n\/* Functional component *\/\nimport React, { Component } from &#039;react&#039;;\nimport { Text } from &#039;react-native&#039;;\n\nexport default function Greeting(props) {\n        return (\n            &lt;Text&gt;Hello {props.name} !&lt;\/Text&gt;\n        );\n}<\/code><\/pre>\n<p style=\"line-height: 21.0pt; background: white; margin: 12.0pt 0in 0in 0in;\">cases are known as a presentational or dumb component. The functional component gets information via props from its parent component and renders the information. You can see that the functional component accepts props as an argument. ES6 arrow function also is used to define a functional component. The functional component doesn\u2019t store any state and also doesn\u2019t override any lifecycle method of React component. The class-based component has the ability to store state within the component and based on its state value behave differently. The latest version of React 16.8 has included a new feature called React hooks by which we can add state in a functional component.<\/p>\n<p><a tabindex=\"0\">15. What is the role of AsyncStorage in React Native ?<\/a><\/p>\n<p>AsyncStorage is React Native\u2019s key-value, unencrypted storage module that allows developers to store data for offline use. Typically, it\u2019s used to store data when an app is not linked to a cloud service, or when specific features require data storage.<\/p>\n<p><a tabindex=\"0\">16. How do you create basic text input in React Native ?<\/a><\/p>\n<p style=\"line-height: 21.0pt; background: white; vertical-align: baseline; margin: 0in 0in .25in 0in;\">The insertion of basic text in React Native apps is handled by the Text and TextInput components. TextInput allows users to type on the app. We can implement it using the following syntax: &lt;import { Text, TextInput, View } from \u2018react-native\u2019&gt;.<\/p>\n<p><a tabindex=\"0\">17. How can you optimize the performance of images in React Native ?<\/a><\/p>\n<p>There are several useful tricks for optimizing the performance of images in React Native. These include:<\/p>\n<ul>\n<li>Using image caching tools<\/li>\n<li>Using PNG or WEBP formats rather than JPEG<\/li>\n<li>Using smaller images<\/li>\n<li>Reducing the number of renders<\/li>\n<\/ul>\n<h3 data-start=\"2634\" data-end=\"2687\"><strong data-start=\"2641\" data-end=\"2687\">Core React Native Components You Must Know<\/strong><\/h3>\n<p data-start=\"2688\" data-end=\"2697\">Includes:<\/p>\n<ul data-start=\"2698\" data-end=\"2766\">\n<li data-start=\"2698\" data-end=\"2706\">\n<p data-start=\"2700\" data-end=\"2706\"><code class=\"\" data-line=\"\">View<\/code><\/p>\n<\/li>\n<li data-start=\"2707\" data-end=\"2715\">\n<p data-start=\"2709\" data-end=\"2715\"><code class=\"\" data-line=\"\">Text<\/code><\/p>\n<\/li>\n<li data-start=\"2716\" data-end=\"2730\">\n<p data-start=\"2718\" data-end=\"2730\"><code class=\"\" data-line=\"\">ScrollView<\/code><\/p>\n<\/li>\n<li data-start=\"2731\" data-end=\"2744\">\n<p data-start=\"2733\" data-end=\"2744\"><code class=\"\" data-line=\"\">TextInput<\/code><\/p>\n<\/li>\n<li data-start=\"2745\" data-end=\"2766\">\n<p data-start=\"2747\" data-end=\"2766\"><code class=\"\" data-line=\"\">Props<\/code> and <code class=\"\" data-line=\"\">State<\/code><\/p>\n<\/li>\n<\/ul>\n<p data-start=\"2768\" data-end=\"2873\">These are fundamentals for both beginners and those answering <strong data-start=\"2830\" data-end=\"2872\">intermediate react interview questions<\/strong>.<\/p>\n<h3 data-start=\"2880\" data-end=\"2955\"><strong data-start=\"2887\" data-end=\"2955\">React Native vs ReactJS \u2013 Key Differences Developers Should Know<\/strong><\/h3>\n<p data-start=\"2956\" data-end=\"3143\">One of the most commonly asked <strong data-start=\"2987\" data-end=\"3032\">react js intermediate interview questions<\/strong> is about distinguishing React Native and ReactJS in terms of component architecture and platform capabilities.<\/p>\n<h3 data-start=\"3150\" data-end=\"3214\"><strong data-start=\"3157\" data-end=\"3214\">Using justifyContent for Flex Layouts in React Native<\/strong><\/h3>\n<p data-start=\"3215\" data-end=\"3369\">You\u2019ll often see this show up in <strong data-start=\"3248\" data-end=\"3290\">intermediate react interview questions<\/strong>, especially in layout-related debugging and performance improvement questions.<\/p>\n<h3 data-start=\"3376\" data-end=\"3428\"><strong data-start=\"3384\" data-end=\"3428\">Different Ways to Write React Components<\/strong><\/h3>\n<p data-start=\"3429\" data-end=\"3457\">Know the difference between:<\/p>\n<ul data-start=\"3458\" data-end=\"3540\">\n<li data-start=\"3458\" data-end=\"3492\">\n<p data-start=\"3460\" data-end=\"3492\">Functional components with hooks<\/p>\n<\/li>\n<li data-start=\"3493\" data-end=\"3540\">\n<p data-start=\"3495\" data-end=\"3540\">Class-based components with lifecycle methods<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"3542\" data-end=\"3611\">This is a core part of <strong data-start=\"3565\" data-end=\"3610\">react js intermediate interview questions<\/strong>.<\/p>\n<h3 data-start=\"3618\" data-end=\"3672\"><strong data-start=\"3625\" data-end=\"3672\">Handling User Input with Text and TextInput<\/strong><\/h3>\n<p data-start=\"3673\" data-end=\"3797\">Basic, yet still asked in many <strong data-start=\"3704\" data-end=\"3746\">react intermediate interview questions<\/strong>, especially when discussing controlled components.<\/p>\n<h3 data-start=\"3804\" data-end=\"3861\"><strong data-start=\"3812\" data-end=\"3861\">Image Optimization Techniques in React Native<\/strong><\/h3>\n<p data-start=\"3862\" data-end=\"3925\">Questions about improving mobile app performance often include:<\/p>\n<ul data-start=\"3926\" data-end=\"3997\">\n<li data-start=\"3926\" data-end=\"3935\">\n<p data-start=\"3928\" data-end=\"3935\">Caching<\/p>\n<\/li>\n<li data-start=\"3936\" data-end=\"3958\">\n<p data-start=\"3938\" data-end=\"3958\">Reducing image sizes<\/p>\n<\/li>\n<li data-start=\"3959\" data-end=\"3997\">\n<p data-start=\"3961\" data-end=\"3997\">Using <code class=\"\" data-line=\"\">FastImage<\/code> or other libraries<\/p>\n<\/li>\n<\/ul>\n<p data-start=\"3999\" data-end=\"4062\">A favorite topic in <strong data-start=\"4019\" data-end=\"4061\">intermediate react interview questions<\/strong>.<\/p>\n<h3 data-start=\"2932\" data-end=\"2953\">Final Thoughts : React JS Intermediate Interview Questions<\/h3>\n<p data-start=\"118\" data-end=\"479\">Mastering these <strong data-start=\"134\" data-end=\"176\">React intermediate interview questions<\/strong> not only prepares you for interviews but also makes you a <strong data-start=\"235\" data-end=\"269\">confident mobile app developer<\/strong>. Whether you&#8217;re transitioning from web development to mobile or refining your React Native skills, focusing on <strong data-start=\"381\" data-end=\"423\">intermediate react interview questions<\/strong> gives you a competitive edge in today\u2019s tech landscape.<\/p>\n<p data-start=\"481\" data-end=\"757\">For those aiming to become <strong data-start=\"508\" data-end=\"533\">full-stack developers<\/strong>, consider enrolling in a <a href=\"https:\/\/www.kaashivinfotech.com\/mern-full-stack-developer-course-in-chennai\/\"><strong data-start=\"559\" data-end=\"580\">MERN stack course<\/strong><\/a> (MongoDB, Express.js, React, Node.js). It\u2019s a powerful combination of technologies that lets you build complete web and mobile applications from front to back using JavaScript.<\/p>\n<p data-start=\"759\" data-end=\"960\">Whether you&#8217;re preparing for interviews or leveling up your skills, deep-diving into <strong data-start=\"844\" data-end=\"889\">react js intermediate interview questions<\/strong> and learning the MERN stack will future-proof your development career.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction React Native (also known as RN) is a popular JavaScript-based mobile app framework that allows developers to build natively-rendered mobile apps for iOS and Android. The biggest appeal? You can use a single codebase to create cross-platform applications. React intermediate interview questions often focus on the key features and architectural decisions that make React [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":5829,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[724],"tags":[1207,738,729,1200,732,1210,1209,1201,1211,1199,1196,1197,1198,1212],"class_list":["post-3440","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions","tag-frontend-interview-questions","tag-interview","tag-javascript-interview-questions","tag-react-interview","tag-react-interview-questions","tag-react-interview-questions-2021","tag-react-interview-questions-2022","tag-react-interview-questions-and-answers","tag-react-js-interview-questions-and-answers","tag-react-native","tag-react-native-interview-questions","tag-react-native-interview-questions-and-answers","tag-react-native-interview-questions-for-freshers","tag-react-native-interview-questions-medium"],"_links":{"self":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/posts\/3440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/comments?post=3440"}],"version-history":[{"count":0,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/posts\/3440\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/media\/5829"}],"wp:attachment":[{"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/media?parent=3440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/categories?post=3440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kaashivinfotech.com\/blog\/wp-json\/wp\/v2\/tags?post=3440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}