<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gökçe Er on Medium]]></title>
        <description><![CDATA[Stories by Gökçe Er on Medium]]></description>
        <link>https://medium.com/@gkcer97?source=rss-7084533045c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tdWvxK13u1n2A163</url>
            <title>Stories by Gökçe Er on Medium</title>
            <link>https://medium.com/@gkcer97?source=rss-7084533045c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 09:15:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gkcer97/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Most Asked React & React Native Interview Questions — Part 1 ]]></title>
            <link>https://medium.com/@gkcer97/most-asked-react-react-native-interview-questions-part-1-4e16ba867b81?source=rss-7084533045c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e16ba867b81</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-interview]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[react-interview]]></category>
            <dc:creator><![CDATA[Gökçe Er]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 18:23:32 GMT</pubDate>
            <atom:updated>2025-06-22T18:25:05.891Z</atom:updated>
            <content:encoded><![CDATA[<h3>Most Asked React &amp; React Native Interview Questions — Part 1 🚀</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*8ANwXaEXEYU3x9Hfqn4VEw.png" /></figure><p>I’ve been actively interviewing over the past two months, and with 6 years of experience in React and React Native, I started to notice a pattern — certain questions came up repeatedly.</p><p>Here’s a breakdown of the 5 most common ones and what you need to know to answer them confidently.</p><h4>1. What is the Virtual DOM in React, and how does the reconciliation process work?</h4><p>The <strong>Virtual DOM</strong> is a lightweight, in-memory representation of the real DOM. When a component’s state or props change, React creates a new Virtual DOM tree and compares it to the previous one using a <strong>diffing algorithm</strong>.</p><p>This comparison process is called <strong>reconciliation</strong>. React identifies what has changed between the two trees and updates only the affected parts of the real DOM. This approach improves performance by avoiding full-page re-renders and minimizing costly DOM operations.</p><p>⚡ Below is a simplified diagram of how React’s Virtual DOM and reconciliation process works:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*_zEJjdIj0tZfJAZQSC3JvQ.png" /><figcaption>Reconciliation diagram</figcaption></figure><h4>2. What is prop drilling and how can we avoid it?</h4><p><strong>Prop drilling</strong> happens when you need to pass data from a parent component down to a deeply nested child — even if the intermediate components don’t need that data. These “in-between” components are forced to accept and forward the prop just to get it to the intended child.</p><p>This can make your code harder to maintain, and as your app grows, it leads to unnecessary re-renders. Every component that receives the prop (even if it doesn’t use it) will re-render when the prop changes — which can become a performance issue.</p><p>⚡ In this example, only the LikeButton component needs access to the user prop, but it must be passed through intermediate components (PostList and PostItem) that don&#39;t use it. This is known as prop drilling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*KTx1kzDtT112qn4O7uNh6A.png" /><figcaption>Props drilling illustration</figcaption></figure><p><strong>💡 How to avoid prop drilling</strong></p><p>You can avoid prop drilling by using:</p><ul><li><strong>React Context API</strong> — great for light data like theme, auth, language</li><li><strong>Global state libraries</strong> like:<br>- Redux (good for larger apps with complex state)<br>- Zustand (lightweight, simple, great for small/medium apps)<br>- MobX (reactive and scalable, though less commonly used today)</li></ul><p>The best choice depends on your app’s size and complexity.</p><h4>3. How would you improve performance of your app?</h4><p>Here’s a table summarizing key ways to improve app performance:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6232f9f859217be9bf8ccdd765f51fbb/href">https://medium.com/media/6232f9f859217be9bf8ccdd765f51fbb/href</a></iframe><h4>4. Explain the useMemo and useCallback hooks and their differences.</h4><p>useMemo is a React hook used to <strong>cache the result of a function</strong>. For example, if you have a long list and a function that filters it based on a query, you don’t want that filter to re-run on every render when the query hasn’t changed. By wrapping the filtering logic in useMemo and passing the query as a dependency, React will return the <strong>cached result</strong> unless the query changes. This helps prevent expensive recalculations.</p><p>useCallback, on the other hand, is used to <strong>cache the function definition itself</strong>. Imagine you’re passing a callback from a parent component to a child. If the parent re-renders, the function gets re-created each time — causing unnecessary re-renders of the child, even if nothing else changed. Wrapping the function in useCallback ensures it keeps the <strong>same reference</strong> across renders, which works well when used with React.memo() to optimize child rendering.</p><p>⚡ <strong>The key difference:</strong></p><ul><li><a href="https://react.dev/reference/react/useMemo">useMemo</a> caches a <strong>returned value</strong>.</li><li><a href="https://react.dev/reference/react/useCallback">useCallback</a> caches the <strong>function itself</strong>.</li></ul><h4>5. How would you store sensitive data?</h4><p>In <strong>React Native</strong>, you should avoid using AsyncStorage for sensitive information like tokens or credentials, as it&#39;s not encrypted by default. Instead, use secure storage libraries like:</p><ul><li><a href="https://github.com/oblador/react-native-keychain">react-native-keychain</a> — widely used, supports biometric protection.</li><li><a href="https://docs.expo.dev/versions/latest/sdk/securestore/">expo-secure-store</a> — easy to use in Expo projects, encrypts data on disk.</li></ul><p>These libraries store data in the device’s <strong>native secure storage systems</strong> like iOS Keychain or Android Keystore, making them much safer.</p><p>In <strong>React (web)</strong>, there’s no true secure storage in the browser. You can store short-lived tokens in <strong>memory</strong> (e.g., React state or context) to reduce exposure. If persistence is necessary, sessionStorage is preferred over localStorage, but both can be accessed via JavaScript — so avoid storing long-term sensitive data in the frontend. Instead, use <strong>HTTP-only cookies</strong> set by the server to store tokens securely.</p><p>That’s it for Part 1 — I hope you found it helpful! Interview prep can feel overwhelming, so take your time and revisit these concepts whenever you need to. Stay tuned for Part 2 😊</p><p>✨ Wishing you the best of luck in landing your next role!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e16ba867b81" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>