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

The Ultimate Guide to Copyright Free Image

High-quality stock photos are typically expensive and obtaining high-quality for free photos is a difficult task. However, some websites offer royalty-free images. The owners of these images have permitted users to modify, edit, and use their images without fear of copyright implications. Here in this blog, we've accumulated a list of the best free and high-quality stock images for websites, blogs, and other purposes.  1.  Unsplash Unsplash is one of the most popular and widely used copyright and royalty-free stock image sites It now has over one million images covering a wide range of topics, with contributors from all over the world uploading images. Unsplash has a license that allows you to use the images for free for the majority of purposes. 2.  Pexels Pexels evaluates its images to ensure that they are of the highest possible quality. There is a lot of exceptional photography to be found on the site, albeit in specific niches. Also, you can get copyright-free stock ...