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...

Top 10 video editing apps for Android

There is a plethora of video editing apps on the Play store and if you are confused about what to download and what not to. Many free Android video editors leave no watermark or logo on your video, while others require a paid subscription to remove the watermark. In this article, we will give you a list of the top 10 best video editing apps for android to replenish your requirements. 1.  splice Splice is a simple yet robust video editing app on android. It has a pro-level video editing app with a performance of desktop editing optimized to perform on mobile devices. It has all the tools required for video editing as cutting, trimming, merging videos, etc. It can even render 4K videos. most importantly, it has no watermark rendered on its output in its free version. You can subscribe for unlocking several premium features. It has been rated 4.3/5 stars by 64k reviewers. Download:  splice 2.  Kinemaster Kinemaster is a pro-level editor with lots of feature in i...