All Projects → NewBieBR → Typescript React Native Starter

NewBieBR / Typescript React Native Starter

A highly scalable foundation with a focus on best pratices and simplicity to start your React Native project in seconds.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Typescript React Native Starter

Hartija Css Print Framework
Universal CSS for web printing
Stars: ✭ 509 (+260.99%)
Mutual labels:  starter-kit, starter, boilerplate
Redux React Navigation Demos
React-Native + Redux + Redux-Persist + React Navigation ( Authentication Flow with Redux demos)
Stars: ✭ 151 (+7.09%)
Mutual labels:  starter-kit, starter, react-navigation
Next Js Blog Boilerplate
🚀 Nextjs Blog Boilerplate is starter code for your blog based on Next framework. ⚡️ Made with Nextjs, TypeScript, ESLint, Prettier, PostCSS, Tailwind CSS.
Stars: ✭ 134 (-4.96%)
Mutual labels:  starter-kit, starter, boilerplate
React Native Navigation Redux Starter Kit
React Native Navigation(v2) Starter Kit with Redux, Saga, ESLint, Babel, Jest and Facebook SDK 😎
Stars: ✭ 271 (+92.2%)
Mutual labels:  starter-kit, starter, boilerplate
Laravel Boilerplate
Laravel Boilerplate / Starter Kit with Gentelella Admin Theme
Stars: ✭ 704 (+399.29%)
Mutual labels:  starter-kit, starter, boilerplate
Niklick
Rails Versioned API solution template for hipsters! (Ruby, Ruby on Rails, REST API, GraphQL, Docker, RSpec, Devise, Postgress DB)
Stars: ✭ 39 (-72.34%)
Mutual labels:  starter-kit, starter, boilerplate
React Webpack Babel
Simple React Webpack Babel Starter Kit
Stars: ✭ 1,241 (+780.14%)
Mutual labels:  starter-kit, starter, boilerplate
Flask Full
starter/boilerplate flask application with celery, mongoengine, signals, shell commands, swagger api docs and sphinx docs integration
Stars: ✭ 117 (-17.02%)
Mutual labels:  starter, boilerplate
Static Site Boilerplate
A better workflow for building modern static websites.
Stars: ✭ 1,633 (+1058.16%)
Mutual labels:  starter-kit, boilerplate
Fullstack Apollo React Boilerplate
💥A sophisticated Apollo in React boilerplate project.
Stars: ✭ 136 (-3.55%)
Mutual labels:  starter-kit, boilerplate
Automatic Gatsbyjs App Landing Page
Automatic GatsbyJS App Landing Page - Automatically generate iOS app landing page using GatsbyJS
Stars: ✭ 137 (-2.84%)
Mutual labels:  starter, boilerplate
Go Postgres Jwt React Starter
A go, gin, and postgres API with jwt auth, complete with a react frontend
Stars: ✭ 115 (-18.44%)
Mutual labels:  starter, boilerplate
Express Rest Boilerplate
⌛️ Express starter for building RESTful APIs
Stars: ✭ 1,794 (+1172.34%)
Mutual labels:  starter, boilerplate
Laravel Hackathon Starter
💻 A hackathon/MVP boilerplate for laravel web applications. Start your hackathons without hassle.
Stars: ✭ 1,589 (+1026.95%)
Mutual labels:  starter, boilerplate
Web Extension Starter
Typescript, React, Redux, Styled-Component and Webpack based sample extension boilerplate. Runs on Chrome and Firefox. Sample chrome extension.
Stars: ✭ 115 (-18.44%)
Mutual labels:  starter, boilerplate
React Native Template
Minimal template with best practices and automation scripts for improved developer experience.
Stars: ✭ 131 (-7.09%)
Mutual labels:  starter, boilerplate
Golang Gin Realworld Example App
Exemplary real world application built with Golang + Gin
Stars: ✭ 1,780 (+1162.41%)
Mutual labels:  starter, boilerplate
Webpack Starter
✨ A lightweight foundation for your next webpack based frontend project.
Stars: ✭ 1,745 (+1137.59%)
Mutual labels:  starter-kit, boilerplate
React Universally
This starter kit contains all the build tooling and configuration you need to kick off your next universal React project, whilst containing a minimal "project" set up allowing you to make your own architecture decisions (Redux/MobX etc).
Stars: ✭ 1,704 (+1108.51%)
Mutual labels:  starter-kit, boilerplate
Generator Create Redux App
Add redux, emotion-js and other useful libraries like react-router in top of create-react-app
Stars: ✭ 137 (-2.84%)
Mutual labels:  starter, boilerplate

Typescript React Native Starter


A highly scalable foundation with a focus on best pratices and simplicity to start your React Native project in seconds.

Quick Start

yarn global add trnc
trnc init <ProjectName>

Features

  • Typescript

    • Typescript based: enhance code quality, understandability and scability with Interface oriented development
  • Flux State management

    • Redux: predictable state container

    • Redux Persist: offline and persistent store

    • typesafe-actions: create typesafe actions easily (and more)

      import { createAction } from 'typesafe-actions';
      
      export const myAction = createAction('MY_ACTION', (payload) => payload)();
      
    • Redux Saga: side effect model for Redux

  • Navigation

  • Unit testing

  • Linting

    • Eslint configured for React Native
    • VSCode Prettier compatible
    • Useful plugins installed (see .eslintrc.js)
  • Internationalization and localization

  • Others

    • Absolute import from src: Before:

       import HomePage from '../../../../containers/HomePage'
      

      After:

       import HomePage from 'src/containers/HomePage'
      
    • react-native-normalize: make your app responsive easily

    • react-native-easy-icon: wrapper component of react-native-vector-icons for easier usage: Before:

      import AntDesignIcon from 'react-native-vector-icons/AntDesign';
      
      <AntDesignIcon name="home" color="blue" size={42}/>
      
      

      After:

      import Icon from 'react-native-easy-icon';
      
      <Icon type="antdesign" name="home" color="blue" size={42}/>
      
    • Cocoapods: iOS dependencies manager

    • jetifier: transition tool for React Native 0.60 AndroidX migration

    • Run linting pre-commit and unit testing pre-push with husky's hooks

    • Placeholder App Icon: useful for uploading your app to beta quickly with Fastlane

    • App Icon generator: generate all required sizes, label and annotate icon.

    • Splash screen generator: generate splash screen easily

Project Structure

├── android
├── app.json
├── assets                               // All assets: images, videos, ...
├── credentials                          // Private informations: API keys,...
├── index.js
├── ios
├── publishing                           // Icon, screenshots, preview,... for App Store & Play Store
└── src
    ├── __tests__                        // Unit tests
    │   ├── App.test.tsx                 // App component's tests
    │   ├── components
    │   │   └── MyComponent.test.txs
    │   └── ...
    ├── App.tsx
    ├── actions                          // Actions
    │   ├── actionTypes.ts               // Action types
    │   └── app.ts                       // appReducer's actions
    ├── components                       // Components
    │   └── MyComponent.tsx
    ├── constants                        // Colors, sizes, routes,...
    │   └── strings.ts                   // i18n
    ├── containers                       // Screens, pages,...
    ├── lib                              // Libraries, services,...
    ├── index.tsx                        // Root component
    ├── reducers                         // Reducers
    │   └── app.ts                       // appReducer
    ├── sagas                            // Redux sagas
    ├── store.ts
    ├── types                            // Type declarations
    │   └── index.d.ts
    └── utils                            // Utilities

Manual Installation

  • Clone this repo

    git clone [email protected]:NewBieBR/typescript-react-native-starter.git <PROJECT_NAME>
    
    cd <PROJECT_NAME>
    
  • Install dependencies

    yarn
    
  • Rename the project

    yarn run rename <PROJECT_NAME>
    
  • Migrate to AndroidX to support React Native 0.60

    yarn jetify
    
  • Update pods

    cd ios && pod install
    
  • Remove .git

    rm -rf .git
    

Recommended configurations

Useful Tips & Notes

Apple Store Connect's missing compliance

This is added to your Info.plist in order to avoid Apple Store Connect's missing compliance warning.

<key>ITSAppUsesNonExemptEncryption</key>
<false/>

So you don't have to Provide Export Compliance Information at every push,

Note that you might have to set that to <true/> if your app uses encryption

Responsiveness with react-native-normalize

Use the normalize functio from react-native-normalize whenever you have to use a hard value (100, 200, 1000,...). This function will adapt your value accordingly to different screen sizes

Without normalize

With normalize

Patch Package

When developing with React Native, sometimes I found bugs in the packages that I use so I fix them directly in the node_modules/package-with-bug. However, when I install a new package with npm install, the changes I made got override.

To prevent this, I use patch-package which allows me to modify and keep the changes I made.

So no more waiting around for pull requests to be merged and published. No more forking repos just to fix that one tiny thing preventing your app from working.

Example:

# fix a bug in one of your dependencies
vim node_modules/some-package/brokenFile.js

# run patch-package to create a .patch file
npx patch-package some-package

# commit the patch file to share the fix with your team
git add patches/some-package+3.14.15.patch
git commit -m "fix brokenFile.js in some-package"

Beta distribution with Fastlane

  • Install fastlane
    # Using RubyGems
    sudo gem install fastlane -NV
    
    # Alternatively using Homebrew
    brew cask install fastlane
    

If you have issue installing or using fastlane on macos, check this solution: https://github.com/fastlane/fastlane/issues/15467#issuecomment-543093498

iOS

  • Open your project Xcode workspace and update your app's Bundle Identifier and Team
  • Initialize fastlane
    cd <PROJECT_NAME>/ios
    fastlane init
    
  • Distribute your app
    fastlane beta
    

Android

  • Collect your Google Credentials

  • Open your project with Android Studio and update your app's applicationId in build.gradle (Module: app) file

  • Select Generated Signed Bundle / APK... from the Build menu

  • Next then Create new... under Key store path then Next and Finish

  • The first time you deploy your application, you MUST upload it into Google Play Console manually. Google don't allow to use theirs APIs for the first upload.

  • Create your application in the Google Play Console (unlike for iOS Fastlane cannot do that for you)

  • Make sure that these 4 checkmark icons are green

    Recommended order: Pricing & distribution, Content rating, Store listing and App releases

    You can find the required assets for Store listing in the publishing/android folder

  • Initialize fastlane

    cd <PROJECT_NAME>/android
    fastlane init
    
  • Use the Fastfile from publishing

    cp publishing/android/fastlane/Fastfile android/fastlane
    
  • Distribute your app

    fastlane beta
    

    There is no official plugin to automatically upgrade android version code (unlike the iOS lane). Before each deployment, be sure to manually upgrade the versionCode value inside android/app/build.gradle.

More

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].