Coder Social home page Coder Social logo

expo-typescript-template's Introduction

Expo Typescript Template

A quick template for using Typescipt and Expo with React Native. NOTE: This template does not support native code.

Table of Contents

Prerequisites and Setup

Before You Get Started

  1. You will need to have node installed.

Project Setup Steps

You will need to run the init script which will install all the necessary items in order to run the project. This will include all the node modules and cli tools.

At the root project directory level run the following command:

npm run init

Running The Project

To run the TS codebase, run for desired platform:

For iOS:

yarn start:ios

For Android:

yarn start:android

Structure

Features

This template is already setup and includes:

  • Testing with Jest
  • Precommit Hooks
  • Linting and Prettier

Screens

A screen is a "route" which will be added to the Stack navigator. Each screen could have its own screens folder. The structure of each folder should be as follows:

  1. index.tsx
  2. presenter.tsx
    • The main logic and export of the component.
  3. styled.tsx
    • Any internal styled glamorous components and stylesheets the presenter.tsx file may use.
    • NOTE: Avoid the react-native/StyleSheet if possible.

Nested Folders:

Each specific screen folder should mimic the root level (src) folder, for any screen-specific needs. For example:

  • components: If there are any modular components that are specific to this screen's presenter.

expo-typescript-template's People

Contributors

mrtnrst avatar

Watchers

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