React Native Starter Setup
DS
Darshan Suthar

React Native Starter Setup

1. Create Project

npx create-expo-app myApp

Go inside:

cd myApp

Start:

npm start

Run on phone using Expo Go.


2. Clean Default App

Open:

App.js

Replace with:

import { View, Text } from "react-native";

export default function App() {
  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      <Text>Starter App</Text>
    </View>
  );
}

3. Create Folder Structure

Create:

app/
screens/
components/
services/
hooks/

Move logic into screens instead of keeping everything in App.


4. Create First Screen

screens/Home.js
import { View, Text, StyleSheet } from "react-native";

export default function Home() {
  return (
    <View style={styles.container}>
      <Text style={styles.title}>Home Screen</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: { flex: 1, justifyContent: "center", alignItems: "center" },
  title: { fontSize: 22, fontWeight: "600" },
});

5. Setup Navigation

Install:

npm install @react-navigation/native
npx expo install react-native-screens react-native-safe-area-context
npm install @react-navigation/native-stack

Update App.js:

import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import Home from "./screens/Home";

const Stack = createNativeStackNavigator();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Home" component={Home} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

Now navigation works.


6. Add Second Screen

screens/Profile.js
import { View, Text, Button } from "react-native";

export default function Profile({ navigation }) {
  return (
    <View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
      <Text>Profile</Text>
      <Button title="Go Home" onPress={() => navigation.navigate("Home")} />
    </View>
  );
}

Update navigator:

<Stack.Screen name="Profile" component={Profile} />

7. API Service Example

Create:

services/productService.js
export async function getProducts() {
  const res = await fetch("https://api.example.com/products");
  return res.json();
}

Use in screen:

useEffect(() => {
  getProducts().then(setProducts);
}, []);

8. Reusable Component Example

components/ProductCard.js
import { View, Text } from "react-native";

export default function ProductCard({ item }) {
  return (
    <View style={{ padding: 12 }}>
      <Text>{item.title}</Text>
    </View>
  );
}

Final Structure

screens/
components/
services/
hooks/

This is enough to start building real apps.

React Native starter setupExpo React Native tutorialReact Native navigation exampleReact Native folder structure beginnerReact Native API integrationReact Native first app guideReact Native screens setupExpo starter app tutorialReact Native project structureReact Native beginner code guide
DS

Darshan Suthar

Chief Architect (Next.js & AI Systems)

I specialize in engineering high-conversion digital experiences. Focused on the intersection of deep technical architecture and premium human-centric design.