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

Favicons: A Simple (But Complete) Guide

A favicon is a little 16x16 graphical icon used for branding a website. This is usually a logo, the brand's first letter, or a generic image. It was introduced in 1999 and was intended to be used in bookmarked URLs. However, these days, there are several instances where favicons are used. Here we will talk all about favicons and the importance of favicons in SEO. Where will you see favicons? It is displayed in the browser tabs, bookmarks, search history, search results, and search recommendations. All the major search engines like Google have incorporated favicons directly into the search results. Usage of favicon Favicon plays an important role in the SEO of the website. Favicon helps your website in a following way. Brand recognition A favicon helps the user identify your website among other similar websites. When the user opens multiple tabs in the browser, the favicon is to help users locate your web page in the browser. To add credibility and trust Favicons add a...