<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tech Nexa</title>
    <description>The latest articles on DEV Community by Tech Nexa (@tech_nexa_8e64b11ae4f24f9).</description>
    <link>https://dev.to/tech_nexa_8e64b11ae4f24f9</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3560711%2Fdfd36866-d18e-4b54-8c3a-18b1c5fd2ede.jpg</url>
      <title>DEV Community: Tech Nexa</title>
      <link>https://dev.to/tech_nexa_8e64b11ae4f24f9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tech_nexa_8e64b11ae4f24f9"/>
    <language>en</language>
    <item>
      <title>From 0 to 1,000 Scans: The Journey of Building a React Native QR Scanner App</title>
      <dc:creator>Tech Nexa</dc:creator>
      <pubDate>Thu, 16 Oct 2025 14:45:35 +0000</pubDate>
      <link>https://dev.to/tech_nexa_8e64b11ae4f24f9/from-0-to-1000-scans-the-journey-of-building-a-react-native-qr-scanner-app-2b9k</link>
      <guid>https://dev.to/tech_nexa_8e64b11ae4f24f9/from-0-to-1000-scans-the-journey-of-building-a-react-native-qr-scanner-app-2b9k</guid>
      <description>&lt;p&gt;Hello, Dev Community!&lt;/p&gt;

&lt;p&gt;Today, I want to share a story that’s about more than just writing code. It's about solving a problem, relentless learning, and finally, bringing an idea from a local machine to the hands of thousands of users. This is the journey of building ScanQR—my first major mobile application, now live on the Google Play Store.&lt;/p&gt;

&lt;p&gt;This isn't just a "look what I made" post. This is a detailed map of how a modern, high-performance app is born, from the core business logic to the actual code snippets that make it all work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.nexa.qr_code" rel="noopener noreferrer"&gt;📲 Download ScanQR for Free on Google Play and See It in Action!&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Part 1: The Problem - Why Build Another QR Scanner?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The market is flooded with scanner apps, but I always felt something was missing. Most apps fell into one of these traps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Slow and Ad-Ridden: The user experience was constantly interrupted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Too Simple: They just scanned links, with no intelligent features.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Uninspired: Lacked any creative features, like a personalized QR code generator.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted an &lt;strong&gt;all-in-one&lt;/strong&gt; tool: lightning-fast, intelligent, secure, and one that empowers user creativity. That was the vision that led to ScanQR.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Part 2: The Heart of ScanQR - A Deep Dive into Core Features and Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's dissect the features that make ScanQR stand out and look at the exact React Native code that brought them to life.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The High-Speed, Performance-Optimized Scanner Engine&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the most critical feature. A slow scanner is a useless scanner.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The User Experience: Instantly scan codes, even in low light or when they're slightly damaged.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inside the Code: I used react-native-vision-camera with its useCodeScanner hook. But I didn't just call the function; I heavily optimized it to prevent re-scans and reduce CPU load.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Here’s the core logic:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ScanScreen.tsx

const lastValueRef = useRef&amp;lt;string&amp;gt;('');
const frameCountRef = useRef(0);
const debounceUntilRef = useRef(0);

const codeScanner = useCodeScanner({
  codeTypes: Platform.OS === 'ios' ? CODE_TYPES_IOS : CODE_TYPES_ANDROID,
  onCodeScanned: codes =&amp;gt; {
    // Only process every Nth frame to save battery
    frameCountRef.current =
      (frameCountRef.current + 1) % SCAN_EVERY_NTH_FRAME;
    if (frameCountRef.current !== 0) return;

    // "Debounce" Logic: Block rapid, repetitive scans
    const now = Date.now();
    if (now &amp;lt; debounceUntilRef.current) return;

    const raw = codes[0]?.value?.trim();
    if (!raw) return;

    // If the code is identical to the last one, wait a bit
    if (raw === lastValueRef.current) {
      debounceUntilRef.current = now + 1000; // Wait 1 second
      return;
    }

    lastValueRef.current = raw;
    debounceUntilRef.current = now + 1200; // Set a cooldown for the new code

    // Parse and display the result
    const parsed = parseLink(raw);
    setResult(parsed);
    bottomSheetRef.current?.expand();
    haptic(); // Trigger haptic feedback
  },
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dev Analysis:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;frameCountRef&lt;/code&gt;: A simple but effective trick to skip frames. This significantly reduces CPU usage and improves battery life.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;debounceUntilRef&lt;/code&gt; &amp;amp; &lt;code&gt;lastValueRef&lt;/code&gt;: This is a manual debouncing technique. It prevents the app from processing the same QR code dozens of times a second, which would cause the UI to stutter and create a jarring experience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Smart, Context-Aware Actions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ScanQR doesn't just show you a string of text. It understands the content and suggests the appropriate action.&lt;/p&gt;

&lt;p&gt;The User Experience: Scan a URL, get an "Open" button. Scan a phone number, get a "Call" button. Scan Wi-Fi credentials, get a "Copy Password" action.&lt;/p&gt;

&lt;p&gt;Inside the Code: This logic lives in the primaryAction function. It's a large switch statement that operates on the result from my custom parseLink function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's a snippet:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ScanScreen.tsx

const primaryAction = async () =&amp;gt; {
  if (!result) return;
  switch (result.kind) {
    case 'URL':
      await Linking.openURL(result.href);
      break;
    case 'PHONE':
      await Linking.openURL(`tel:${result.number}`);
      break;
    case 'EMAIL': {
      // ... logic to build email query params ...
      await Linking.openURL(`mailto:${result.to ?? ''}?${qp.toString()}`);
      break;
    }
    case 'WIFI':
      Clipboard.setString(
        `WIFI:T:${result.encryption};S:${result.ssid};P:${result.password};;`,
      );
      Toast.show({
        type: 'success',
        text1: t('message.copied_to_clipboard'),
      });
      break;
    // ... many more cases for vCard, SMS, Geo, Crypto ...
    default:
      if ('text' in result) {
        Clipboard.setString(result.text);
        Toast.show({ /* ... */ });
      }
      break;
  }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dev Analysis&lt;/strong&gt;: Separating the parsing logic (&lt;code&gt;parseLink&lt;/code&gt;) from the action logic (&lt;code&gt;primaryAction&lt;/code&gt;) keeps the code clean and maintainable. Using React Native's built-in &lt;code&gt;Linking&lt;/code&gt; and &lt;code&gt;Clipboard&lt;/code&gt; APIs allows for deep integration with the operating system.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;3. Scan QR Codes from the Image Gallery&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a convenient feature that many users requested.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The User Experience&lt;/strong&gt;: Pick a photo containing a QR code from your gallery, and ScanQR will instantly recognize it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inside the Code&lt;/strong&gt;: I combined two powerful libraries: &lt;code&gt;react-native-image-crop-picker&lt;/code&gt; for selecting the image and &lt;code&gt;@react-native-ml-kit/barcode-scanning&lt;/code&gt; for analyzing the static image.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The implementation is quite straightforward:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// ScanScreen.tsx
import ImageCropPicker from 'react-native-image-crop-picker';
import BarcodeScanning from '@react-native-ml-kit/barcode-scanning';

const onImagePicker = () =&amp;gt; {
  ImageCropPicker.openPicker({ mediaType: 'photo' })
    .then(async image =&amp;gt; {
      if (!image?.sourceURL &amp;amp;&amp;amp; !image?.path) return;
      try {
        const uri = image.sourceURL ?? image.path;
        // Use ML Kit to scan the code from the image's URI
        const barcodes = await BarcodeScanning.scan(uri);
        const raw = barcodes?.[0]?.value?.trim();

        if (!raw) throw new Error('No barcode found');

        // Reuse the same parsing and display logic
        const parsed = parseLink(raw);
        setResult(parsed);
        bottomSheetRef.current?.expand();
        haptic();
      } catch {
        Toast.show({ type: 'error', text1: t('message.invalid_qr_code') });
      }
    })
    .catch(err =&amp;gt; { console.log('Image picker error', err); });
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dev Analysis&lt;/strong&gt;: The beauty here is reusability. Once I get the raw data from the image, I pass it through the exact same processing flow (&lt;code&gt;parseLink&lt;/code&gt;, &lt;code&gt;setResult&lt;/code&gt;, expand bottom sheet) as a camera scan. This is efficient and reduces code duplication.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Part 3: The Final Stretch - Publishing to the Google Play Store&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Finishing the code is only half the battle. The publishing process is a whole other challenge:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Creating the App Bundle (.aab)&lt;/strong&gt;: Learning the process of signing and generating a production-ready build for Google Play.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crafting the Store Presence&lt;/strong&gt;: Designing an icon, taking screenshots, and writing compelling, SEO-friendly descriptions for the app page. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy Policy&lt;/strong&gt;: This is a must. I created a simple, clear privacy policy on GitHub Pages, committing to user privacy. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Anxious Wait&lt;/strong&gt;: Submitting the app and waiting for Google's review. The feeling of seeing that "Your app is now live" email is indescribable!&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Conclusion and Your Invitation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The journey of building ScanQR has taught me so much about React Native, performance optimization, and the full product development lifecycle.&lt;/p&gt;

&lt;p&gt;It was built with a developer's passion but designed for everyone. If you're looking for a powerful, privacy-respecting, and completely free QR code tool, please give ScanQR a try.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Download the App&lt;/strong&gt;: &lt;a href="https://play.google.com/store/apps/details?id=com.nexa.qr_code" rel="noopener noreferrer"&gt;Link&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1xoyet35dfxgopxsyvd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1xoyet35dfxgopxsyvd.png" alt="Link Application" width="800" height="1037"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Put It to the Test&lt;/strong&gt;: Scan everything, generate your own codes, and experience the difference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Leave Feedback&lt;/strong&gt;: Your reviews and suggestions are invaluable and will help shape the future of the app.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thank you for reading my story. I hope it inspires anyone out there with a project idea of their own!&lt;/p&gt;

&lt;p&gt;A question for my fellow devs: What was the biggest technical hurdle you've ever faced in a personal project? Share it in the comments below!&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>mobile</category>
    </item>
    <item>
      <title>A Personal Guide to Setting Up React Native on Mac: My Journey</title>
      <dc:creator>Tech Nexa</dc:creator>
      <pubDate>Sun, 12 Oct 2025 15:29:22 +0000</pubDate>
      <link>https://dev.to/tech_nexa_8e64b11ae4f24f9/a-personal-guide-to-setting-up-react-native-on-mac-my-journey-2o62</link>
      <guid>https://dev.to/tech_nexa_8e64b11ae4f24f9/a-personal-guide-to-setting-up-react-native-on-mac-my-journey-2o62</guid>
      <description>&lt;p&gt;Hello, future teammate!&lt;/p&gt;

&lt;p&gt;If you're reading this, I bet you're just as excited as I was to start building amazing mobile apps with React Native. It's an awesome choice! I've been exactly where you are now: thrilled, but also a little overwhelmed by the sheer number of tools you need to install.&lt;/p&gt;

&lt;p&gt;This isn't another dry, technical document. This is my journal, my "lessons learned the hard way," shared with the hope of making your path a little smoother. Let's get started together!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Gearing Up with the Right Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just like a skilled carpenter needs a good set of chisels and a sturdy workbench, we need a solid foundation of software tools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Homebrew - Your Ultimate Butler:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think of Homebrew as your personal tech butler. Instead of hunting for download links on countless websites, you just type a command, and Homebrew fetches and installs everything for you. If you haven't met it yet, open your Terminal and summon it with this spell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://brew.sh" rel="noopener noreferrer"&gt;Homebrew Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Node.js &amp;amp; Watchman - The Heart and the Pulse:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js&lt;/strong&gt; is the 'heart' that pumps life into your JavaScript code. It's the environment where everything runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watchman&lt;/strong&gt; is the 'pulse.' It's a little tool from Facebook that keeps an eye on your files. The moment you save a change, Watchman sees it and tells your app to reload instantly. This is the magic behind "Fast Refresh."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get them both with our new butler, Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install node
brew install watchman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; &amp;amp; &lt;a href="https://facebook.github.io/watchman/" rel="noopener noreferrer"&gt;Watchman&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 2: The iOS Adventure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To build apps for iPhones and iPads, we need to enter Apple's world. Xcode is the key.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Install Xcode:&lt;/strong&gt; The best place to get this is the Mac App Store. A friendly warning: it's a huge file. This is a perfect time to go make a fresh cup of coffee (or two). It'll take a while.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://developer.apple.com/xcode/" rel="noopener noreferrer"&gt;Xcode on the Apple Developer Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Set Up Command Line Tools:&lt;/strong&gt; Once Xcode is installed, open it up. Go to Xcode &amp;gt; Settings &amp;gt; Locations. In the dropdown for "Command Line Tools," make sure a version is selected. This is like telling your Mac, "Hey, I've got all these cool new tools from Xcode, and you're allowed to use them from the Terminal."&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;CocoaPods - The Librarian:&lt;/strong&gt;&lt;br&gt;
Almost every iOS project uses extra bits of code from other developers, called libraries. CocoaPods is the friendly librarian that manages all of these for you. Let's install it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo gem install cocoapods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://cocoapods.org/" rel="noopener noreferrer"&gt;CocoaPods Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: The Android Quest&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Android setup can feel like a side quest with a few more steps, but trust me, the feeling of seeing your app run on both platforms is worth it.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Java Development Kit (JDK) - The Lingua Franca:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Android's native language is Java/Kotlin, so we need a JDK to help React Native talk to it. Let's have Homebrew handle this for us:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask zulu@17
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the JDK installation, add or update your &lt;code&gt;JAVA_HOME&lt;/code&gt; environment variable in &lt;code&gt;~/.zshrc&lt;/code&gt; (or in &lt;code&gt;~/.bash_profile&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;If you used above steps, JDK will likely be located at &lt;code&gt;/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;strong&gt;Android Studio - The Command Center:&lt;/strong&gt;&lt;br&gt;
Download and install Android Studio from Google's website. During the setup, choose "Custom" installation and make sure these are checked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Android SDK&lt;/li&gt;
&lt;li&gt;Android SDK Platform&lt;/li&gt;
&lt;li&gt;Android Virtual Device (this lets you create phone emulators)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://developer.android.com/studio" rel="noopener noreferrer"&gt;Android Studio Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.&lt;strong&gt;Teaching Your Terminal the Way - Environment Variables:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the step where many people get stuck, but it's not as scary as it looks. We just need to leave a note for our Terminal telling it where to find all the Android tools.&lt;/p&gt;

&lt;p&gt;Open your &lt;strong&gt;~/.zshrc&lt;/strong&gt; file (it's a hidden file in your home directory) and add these lines at the bottom:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After you save it, close and reopen your Terminal. This simple step makes sure that when you type a command like &lt;code&gt;emulator&lt;/code&gt;, your computer knows exactly where to look.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Learn more:&lt;/strong&gt; &lt;a href="https://reactnative.dev/docs/set-up-your-environment" rel="noopener noreferrer"&gt;React Native Docs on Environment Variables&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4: The "It's Alive!" Magic Moment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alright, the stage is set. It's time to bring your first creation to life.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Create Your Project:&lt;/strong&gt;&lt;br&gt;
In your Terminal, run this command. &lt;code&gt;MyFirstApp&lt;/code&gt; can be whatever you want to name your project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx @react-native-community/cli@latest init MyFirstApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;strong&gt;Step Inside:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd MyFirstApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;2.1.&lt;strong&gt;Run on IOS:&lt;/strong&gt;&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run ios
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;This will automatically boot up the iOS Simulator and you should see your app pop up. It's a magical feeling the first time!&lt;/p&gt;

&lt;p&gt;2.2.&lt;strong&gt;Run on Android:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run on Android:&lt;br&gt;
First, open Android Studio and start an emulator from the AVD Manager. Then, in your terminal, run:&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run android
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;And voilà! The same app, running on a completely different system.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Don't Panic! We've All Been There (Troubleshooting)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you hit a roadblock, take a deep breath. Every single developer has faced these errors. You're not alone. Here are some common hurdles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; &lt;code&gt;pod install&lt;/code&gt; fails on your shiny new M1/M2/M3 Mac.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Story:&lt;/strong&gt; Your Mac's chip speaks a new language (ARM), but some old tools still speak the old one (x86). Sometimes they get lost in translation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Tell your Mac to use its built-in translator, Rosetta.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ios
arch -x86_64 pod install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; Android build complains it "can't find SDK location."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Story:&lt;/strong&gt; The message you left in &lt;code&gt;~/.zshrc&lt;/code&gt; got lost, or you forgot to restart the Terminal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Double-check the path in &lt;code&gt;~/.zshrc&lt;/code&gt;. If it's still not working, you can leave a more direct note inside the project. Create a file at &lt;code&gt;android/local.properties&lt;/code&gt; and put this inside (remember to change &lt;code&gt;YOUR_USERNAME&lt;/code&gt;!):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sdk.dir = /Users/YOUR_USERNAME/Library/Android/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Your Journey Begins Now&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And there you have it! You've successfully built your launchpad. The road ahead is filled with exciting challenges, learning, and the incredible joy of creating something from scratch. For your next steps, the official React Native documentation is your best friend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dive Deeper:&lt;/strong&gt; &lt;a href="https://reactnative.dev/docs/getting-started" rel="noopener noreferrer"&gt;React Native Official Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Welcome to the club. Happy coding!&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>programming</category>
    </item>
    <item>
      <title>A Personal Guide to Setting Up React Native on Mac: My Journey</title>
      <dc:creator>Tech Nexa</dc:creator>
      <pubDate>Sun, 12 Oct 2025 15:29:22 +0000</pubDate>
      <link>https://dev.to/tech_nexa_8e64b11ae4f24f9/a-personal-guide-to-setting-up-react-native-on-mac-my-journey-30pl</link>
      <guid>https://dev.to/tech_nexa_8e64b11ae4f24f9/a-personal-guide-to-setting-up-react-native-on-mac-my-journey-30pl</guid>
      <description>&lt;p&gt;Hello, future teammate!&lt;/p&gt;

&lt;p&gt;If you're reading this, I bet you're just as excited as I was to start building amazing mobile apps with React Native. It's an awesome choice! I've been exactly where you are now: thrilled, but also a little overwhelmed by the sheer number of tools you need to install.&lt;/p&gt;

&lt;p&gt;This isn't another dry, technical document. This is my journal, my "lessons learned the hard way," shared with the hope of making your path a little smoother. Let's get started together!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Gearing Up with the Right Tools&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Just like a skilled carpenter needs a good set of chisels and a sturdy workbench, we need a solid foundation of software tools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Homebrew - Your Ultimate Butler:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think of Homebrew as your personal tech butler. Instead of hunting for download links on countless websites, you just type a command, and Homebrew fetches and installs everything for you. If you haven't met it yet, open your Terminal and summon it with this spell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://brew.sh" rel="noopener noreferrer"&gt;Homebrew Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Node.js &amp;amp; Watchman - The Heart and the Pulse:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js&lt;/strong&gt; is the 'heart' that pumps life into your JavaScript code. It's the environment where everything runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watchman&lt;/strong&gt; is the 'pulse.' It's a little tool from Facebook that keeps an eye on your files. The moment you save a change, Watchman sees it and tells your app to reload instantly. This is the magic behind "Fast Refresh."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's get them both with our new butler, Homebrew:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install node
brew install watchman
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; &amp;amp; &lt;a href="https://facebook.github.io/watchman/" rel="noopener noreferrer"&gt;Watchman&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 2: The iOS Adventure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To build apps for iPhones and iPads, we need to enter Apple's world. Xcode is the key.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Install Xcode:&lt;/strong&gt; The best place to get this is the Mac App Store. A friendly warning: it's a huge file. This is a perfect time to go make a fresh cup of coffee (or two). It'll take a while.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://developer.apple.com/xcode/" rel="noopener noreferrer"&gt;Xcode on the Apple Developer Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Set Up Command Line Tools:&lt;/strong&gt; Once Xcode is installed, open it up. Go to Xcode &amp;gt; Settings &amp;gt; Locations. In the dropdown for "Command Line Tools," make sure a version is selected. This is like telling your Mac, "Hey, I've got all these cool new tools from Xcode, and you're allowed to use them from the Terminal."&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;CocoaPods - The Librarian:&lt;/strong&gt;&lt;br&gt;
Almost every iOS project uses extra bits of code from other developers, called libraries. CocoaPods is the friendly librarian that manages all of these for you. Let's install it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo gem install cocoapods
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://cocoapods.org/" rel="noopener noreferrer"&gt;CocoaPods Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: The Android Quest&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Android setup can feel like a side quest with a few more steps, but trust me, the feeling of seeing your app run on both platforms is worth it.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Java Development Kit (JDK) - The Lingua Franca:&lt;/strong&gt;&lt;br&gt;
Android's native language is Java/Kotlin, so we need a JDK to help React Native talk to it. Let's have Homebrew handle this for us:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install --cask zulu@17
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the JDK installation, add or update your &lt;code&gt;JAVA_HOME&lt;/code&gt; environment variable in &lt;code&gt;~/.zshrc&lt;/code&gt; (or in &lt;code&gt;~/.bash_profile&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;If you used above steps, JDK will likely be located at &lt;code&gt;/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;strong&gt;Android Studio - The Command Center:&lt;/strong&gt;&lt;br&gt;
Download and install Android Studio from Google's website. During the setup, choose "Custom" installation and make sure these are checked:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Android SDK&lt;/li&gt;
&lt;li&gt;Android SDK Platform&lt;/li&gt;
&lt;li&gt;Android Virtual Device (this lets you create phone emulators)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Official Docs:&lt;/strong&gt; &lt;a href="https://developer.android.com/studio" rel="noopener noreferrer"&gt;Android Studio Website&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.&lt;strong&gt;Teaching Your Terminal the Way - Environment Variables: **&lt;br&gt;
This is the step where many people get stuck, but it's not as scary as it looks. We just need to leave a note for our Terminal telling it where to find all the Android tools.&lt;br&gt;
Open your **~/.zshrc&lt;/strong&gt; file (it's a hidden file in your home directory) and add these lines at the bottom:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After you save it, close and reopen your Terminal. This simple step makes sure that when you type a command like &lt;code&gt;emulator&lt;/code&gt;, your computer knows exactly where to look.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Learn more:&lt;/strong&gt; &lt;a href="https://reactnative.dev/docs/set-up-your-environment" rel="noopener noreferrer"&gt;React Native Docs on Environment Variables&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4: The "It's Alive!" Magic Moment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Alright, the stage is set. It's time to bring your first creation to life.&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Create Your Project:&lt;/strong&gt;&lt;br&gt;
In your Terminal, run this command. &lt;code&gt;MyFirstApp&lt;/code&gt; can be whatever you want to name your project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx @react-native-community/cli@latest init MyFirstApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;strong&gt;Step Inside:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd MyFirstApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;2.1.&lt;strong&gt;Run on IOS:&lt;/strong&gt;&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run ios
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;This will automatically boot up the iOS Simulator and you should see your app pop up. It's a magical feeling the first time!&lt;/p&gt;

&lt;p&gt;2.2*&lt;em&gt;Run on Android:&lt;/em&gt;*&lt;br&gt;
Run on Android:&lt;br&gt;
First, open Android Studio and start an emulator from the AVD Manager. Then, in your terminal, run:&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run android
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;And voilà! The same app, running on a completely different system.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Don't Panic! We've All Been There (Troubleshooting)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you hit a roadblock, take a deep breath. Every single developer has faced these errors. You're not alone. Here are some common hurdles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; &lt;code&gt;pod install&lt;/code&gt; fails on your shiny new M1/M2/M3 Mac.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Story:&lt;/strong&gt; Your Mac's chip speaks a new language (ARM), but some old tools still speak the old one (x86). Sometimes they get lost in translation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Tell your Mac to use its built-in translator, Rosetta.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ios
arch -x86_64 pod install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; Android build complains it "can't find SDK location."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Story:&lt;/strong&gt; The message you left in &lt;code&gt;~/.zshrc&lt;/code&gt; got lost, or you forgot to restart the Terminal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix:&lt;/strong&gt; Double-check the path in &lt;code&gt;~/.zshrc&lt;/code&gt;. If it's still not working, you can leave a more direct note inside the project. Create a file at &lt;code&gt;android/local.properties&lt;/code&gt; and put this inside (remember to change &lt;code&gt;YOUR_USERNAME&lt;/code&gt;!):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sdk.dir = /Users/YOUR_USERNAME/Library/Android/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Your Journey Begins Now&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And there you have it! You've successfully built your launchpad. The road ahead is filled with exciting challenges, learning, and the incredible joy of creating something from scratch. For your next steps, the official React Native documentation is your best friend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dive Deeper:&lt;/strong&gt; &lt;a href="https://reactnative.dev/docs/getting-started" rel="noopener noreferrer"&gt;React Native Official Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Welcome to the club. Happy coding!&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
