GithubHelp home page GithubHelp logo

eldritchunter / expo-router-typescript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thedevenvironment/expo-router-typescript

0.0 0.0 0.0 1.18 MB

Quickstart Expo Application with Typescript and Expo Router Baked In.

JavaScript 35.40% TypeScript 64.60%

expo-router-typescript's Introduction

Expo Router Typescript

@thedevenviroment

1. Introduction

2. Folder Structure

3. Getting Started

4. Further Reading


1. Introduction

This repo is a scaffolding of an Expo application that uses Expo Router and it's file based routing capibilities. It has all the necessary packages needed to just start the application and begin adding routes.

The reason it exists is to mitigate the amount of work needed to add typescript, jest, absolute imports and eslint into the traditional quickstart that the create-expo-app CLI command provides.

Two sample screens have been created, so everything will run out of the box. Also a number of useful scripts have been created in the package.json that allow the ability to run, build, test, lint and serve the application.

2. Folder Structure

a. App Directory:

  • This folder is used at the file based router. Any file that lives here will be converted to a route for the application. Learn More

b. Src Directory:

  • This is where the application logic will live.

  • The assets folder hosts images, fonts and base styles.

  • The components folder is where reusable react components will live.

  • The hooks folder has a useAppLoading hook that handles the logic of loading assets and displaying the spinner.

  • The layouts folder is where the view wrapper logic lives.

  • The screens Folder maps 1:1 with the routes in the app directory. The / path points to the Home.tsx screen, and then /second points to the Second.tsx screen. If you don't like this structure, you can move the component logic directly into the .tsx files in the app directly, however this provides a more robust solution.

3. Getting Started

a. Clone this repo to your local machine:

git clone [email protected]:thedevenvironment/expo-router-typescript.git

b. Install dependencies:

npm ci

c. Start the dev server:

npm run dev

d. When prompted, choose which platform to run on:

  • a - android
  • i - ios
  • w - web

4. Further Reading:

expo-router-typescript's People

Contributors

haytherecharlie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.