Great question 👍
Let’s go step by step so you can start building a React Native app from scratch.
🚀 Getting Started with React Native
1. Install Prerequisites
Before creating a project, make sure you have:
-
Node.js (LTS recommended – check with
node -v
) -
npm (comes with Node) or yarn (
npm install -g yarn
) -
Java JDK (for Android builds)
-
Android Studio (with SDK + emulator or real device)
-
(Optional) Watchman (for macOS/Linux, improves file watching)
2. Create a New Project
Run this in your terminal:
👉 This creates a folder MyFirstApp
with everything set up.
Move into it:
3. Run the App
▶️ On Android (emulator or real device)
(Phone must have USB debugging enabled OR emulator running)
▶️ On iOS (Mac only)
4. Start the Development Server
React Native uses Metro bundler. Start it with:
This watches your code and reloads app changes automatically.
5. Edit Your App
Open App.js
in your project folder.
Change the text inside the default screen, e.g.:
Save → App reloads → You see your changes instantly.
6. Learn Core Components
Some essential components:
-
View
→ like a<div>
(containers) -
Text
→ display text -
Image
→ display images -
Button
→ basic buttons -
TextInput
→ input fields -
ScrollView
/FlatList
→ lists and scrolling
7. Next Steps
-
Learn React Navigation (
@react-navigation/native
) for multiple screens -
Use AsyncStorage or SQLite/Realm for local data
-
Try fetching APIs with
fetch
oraxios
✅ With just this, you’ll have a working mobile app you can run on your Redmi A2 (or emulator) and keep improving step by step.
Do you want me to:
👉 (A) give you a minimal working "Hello World" project code you can paste directly, OR
👉 (B) outline a step-by-step practice roadmap (small milestones to learn React Native gradually)?
Tests
(base) jain@jain-ThinkPad-T440s:~/Desktop/ws/react_native_apps$ node -v v18.19.1
No comments:
Post a Comment