DEV Community

Cover image for ๐Ÿš€ Day 1: My React Native Journey Begins!
Ndeze Bonheur Emmanuel
Ndeze Bonheur Emmanuel

Posted on • Edited on

๐Ÿš€ Day 1: My React Native Journey Begins!

Today I officially started my React Native adventure. In this post, Iโ€™m not just logging progressโ€”Iโ€™ll walk you through what I set up and how the code works, so you can follow along step-by-step.


โœ… What I Did Today

  • Created a new Expo + TypeScript app:
npx create-expo-app my-first-app --template blank (TypeScript)
Enter fullscreen mode Exit fullscreen mode
  • Initialized a GitHub repo for version control.
  • Built a simple HomeScreen to display a welcome message.
  • Committed and pushed all code.
  • Captured a screenshot of the app running on Android.

๐Ÿงฑ Code Breakdown โ€” My HomeScreen

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

export default function HomeScreen() {
  return (
    <View style={styles.container}>
      <Text style={styles.title}>๐Ÿ‘‹ Welcome to My First React Native App</Text>
      <Text style={styles.subtitle}>Day 1 โ€“ Getting Started ๐Ÿš€</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,  
    justifyContent: "center",
    alignItems: "center",
    padding: 20,
    backgroundColor: "#f8f8ff",
  },
  title: {
    fontSize: 24,
    fontWeight: "bold",
    marginBottom: 12,
  },
  subtitle: {
    fontSize: 16,
    color: "#666",
  },
});

Enter fullscreen mode Exit fullscreen mode

๐Ÿง  What This Code Does

  • StyleSheet.create keeps styles clean and performant.
  • container uses Flexbox to center content.
  • backgroundColor, fontSize, and margin make the UI visually appealing and readable.

๐Ÿ“ Connecting the Screen in App.tsx

import React from "react";
import { SafeAreaView } from "react-native";
import HomeScreen from "./src/screens/HomeScreen";

export default function App() {
  return (
    <SafeAreaView style={{ flex: 1 }}>
      <HomeScreen />
    </SafeAreaView>
  );
}

Enter fullscreen mode Exit fullscreen mode

๐Ÿง  What This Code Does

  • We wrap the app in SafeAreaView to handle notches and status bars.
  • Flex styling ensures the screen fills the device display.

๐Ÿงฉ Putting It All Together

  1. HomeScreen uses React Native components like View, Text.
  2. StyleSheet defines reusable styles.
  3. App.tsx renders the screen within a safe layout.

Once saved, simply run:

npx expo start
Enter fullscreen mode Exit fullscreen mode

Youโ€™ll see your welcome screen

๐Ÿ”— Repo

Check out todayโ€™s code here:

๐Ÿ‘‰ GitHub - My First React Native App


๐Ÿ–ผ Screenshot

Image description


๐Ÿ”ญ Day 2 Preview

Next up: adding React Navigationโ€”weโ€™ll create a second screen and navigate between them using a stack navigator. Be ready for multi-screen flow!


Follow me if you want to join me on this full React Native journey. Iโ€™ll be posting daily progress and projects!

Top comments (0)