Skip to main content

create a react native app with expo without using typescript

React Native, combined with Expo, provides an easy and efficient way to build mobile applications. While TypeScript is commonly used for type safety, many developers prefer JavaScript for its simplicity and faster setup.

Prerequisites

Before getting started, ensure you have the following installed:

  • Node.js 

  • npm or yarn ( you will get it along node js)

  • Expo CLI (for building app for production )

Setting Up the Expo App

The original setup that expo@latest would give you includes file-based routing. To create a new React Native project without TypeScript, run the following command:

npx create-expo-app your-appname --template blank

you can replace your-appname with name of your choice

additionally you need to install some other packages such as expo router

npx expo install expo-router

Once the project is created, navigate to your project directory:

cd your-appname

Project Structure

Your project structure should look like this:

your-appname/ ├── App/ ├── package.json ├── node_modules/ ├── assets/ ├── babel.config.js └── app.json

How to use expo routing

create _layout.js in app folder as

import React from "react";

import { Stack } from "expo-router";
export default function RootLayout() {
return (
<Stack screenOptions={{ headerShown: false }} />
);
}
here context api or redux can be used by wrapping Stack.

Conclusion

By following these steps, you have successfully set up a React Native Expo app

without TypeScript. You can now build and expand your app using JavaScript,

React Navigation, and styling libraries like NativeWind.


Comments

Popular posts from this blog

Programming on Android Devices

If you are an aspiring programmer who wants to code on the go, you might be wondering how I can do programming on Android device either be a tablet or smartphone. Programming on Android devices can be challenging, it is difficult to find a way for software development on android devices. Here, in this blog post I will share with you some of the methods that might be helpful whether you want to learn a new language, practice your skills, or work on a project. VS code for web VSCode web is a browser-based version of the popular code editor that lets you edit and run code from anywhere. It's great for working on projects on the go, or for collaborating with others online. But what if you don't have a laptop or a desktop computer handy? What if you only have an Android tablet? Well, you can still use VSCode web with a few simple steps. Here's how: Open your Android tablet's browser and go to https://vscode.dev/. This will launch VSCode web in your browser. Tap on the menu i...

How next JS is different from react JS.

If you are a web developer, you have probably heard of React, the popular JavaScript library for building user interfaces. React is widely used for creating single-page applications (SPAs) that run in the browser and offer a fast and interactive user experience. However, React is not a framework, but a library, which means that it does not provide a complete solution for building web applications. You still need to configure other tools and libraries, such as routing, state management, server-side rendering, code splitting, testing, etc. This is where Next.js comes in. Next.js is a framework that builds on top of React and provides a lot of features and benefits that React alone does not offer. Next.js is designed to make web development easier and faster, by providing a ready-made solution for common web development challenges. In this blog post, we will compare Next.js and React and see what the main differences and advantages are of each one. but first we should know about the d...

How much RAM is enough for android tv

When shopping for an Android TV or Android TV box, you will realize that many low-cost models feature only 1GB to 2GBs of RAM. As for the android smartphone, we know that at least 2 GB ram is necessary for better performance, which leads us to believe that 1 GB ram is sufficient for android tv or android tv boxes. If this question is holding on to your decision to purchase a quality android television, you've arrived at the right place. This page contains all of the answers to the queries. How much RAM is enough for android tv RAM is a type of temporary memory that stores data from apps. If you don't have an optimum amount of RAM, any activity on your Smart TV might cause it to fill up too rapidly, causing the TV to function slower and past data to be lost to free up the RAM. In android TVs, 1GB of RAM is sufficient to run all essential modern applications. However, for optimal performance, an android TV or TV box with RAM  2 GB  or more is recommended. You can buy low RAM mod...