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

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

How to play Retro Games on Android box and phones

Want to play old-school games on your Android phone? You can still play old games even if your old consoles have been destroyed. All you need is an Android phone, tablet, or even an android tv box. Everyone can enjoy retro gaming on android devices and take a nostalgic trip down memory lane. Mainly you can play retro games in two ways- 1. By using an emulator 2. Playing the games ported to android Retro console Emulators Retro Gaming Emulators for Android are specialized apps designed to mimic the functions of an original device and run retro games on Android. These emulators allow you to play classic games from various gaming consoles such as the Nintendo NES, PlayStation, etc. Some of the emulators are available for android TVs and you can use controllers too. Emulators require game ROMs that are compatible with the platform being emulated. However, if you do not already own the game, downloading and using game ROMs is a violation of copyright. ROMs can be directly downloaded to your...