Giter Site home page Giter Site logo

native-starter's Introduction

Native-Starter

A starter repo for iOS and Android with a Navigator, TabBar, and MobX store for app state.

Up and Running

$ git clone [email protected]:constelation/native-starter.git <YOUR_REPO_NAME>
$ cd <YOUR_REPO_NAME>
$ ./rename.sh <YourProjectName>    # this script will rename your project from NativeStarter
$ git remote set-url origin <YOUR_NEWLY_CREATED_GIT_REPO_URL>
$ npm install

Environment Setup

ToDo

How to Run

iOS
$ npm start                     # Start react-native packager server, which serves up the js bundle to the emulators
$ npm run xcode                 # Open xcode for the project

Click on Play button (cmd+r) to run the app on the ios Simulator

Android

You will need a maximum of 3 terminal tabs/windows to run the React Native packager, Android Virtual Devices, and view the Android logs

$ npm start                     # note: not needed if it is already running (from ios step)
$ npm run android-emulator      # Open the android emulator manager
  1. Select the Emulator that you've already created (from the Getting Started steps)
  2. Click Start...
  3. Click Launch
$ npm run android               # Deploy the app to the already running emulator and hook in to its logs

Dev notes

Please consult the React Playbook

  • Be sure to enable live reload if you want your file changes to immediately reload the app
  • YellowBox is disabled. See index.android.js and index.ios.js to re-enable it if you'd like.

Directory Layout

.
├── /android/                   # android-specific code (bootstrapped from `react-native init`)
├── /ios/                       # ios-specific code (bootstrapped from `react-native init`)
|
├── /assets
│   ├── /fonts/
│   ├── /images/
│   └── /videos/
|
├── /app                        # Your app-specific source code of the application
│   ├── /store/                 # Responsible for you app state. Houses MobX actions and observables
│   ├── /scenes/                # Components that are handled by a Navigator. Same as pages, views, etc for the app.
│   |   ├── /App/               # Root scene
│   |       ├── /_/             # Subcomponents of App
│   |       └── /App.js         # Component used in index.ios.js
│   ├── /shared/                # Shared components used in 2+ scenes
│   └── /utils/                 # **Optional** Helper js functions that are app and/or model aware
|
├── /lib                        # Your non-app-specific Components and functions
|
├── /node_modules/              # 3rd-party libraries and utilities
└── package.json                # The list of 3rd party libraries and utilities

Run targets

  • npm start - start react packager
  • npm run ios - starts iOS simulator
  • npm run xcode - launch XCode
  • npm run android-emulator - launch Android Virtual Device Manager (to start emulator)
  • npm run android - run app on emulator and show logs in terminal
  • npm run reinstall - wipe out node_modules, reset watchman, then install node_modules again
  • npm run upgrade - react-native upgrade, then react-native link (BE SURE TO READ THE UPGRADE DOC ABOVE!)

import-js for auto-imports

This project is set up for import-js to organize and include your imports. Just create a new file, start writing the code that matters, then fire off a ImportJSFix from your editor to have it auto-populate.

Support

  • Talk to @kylpo

native-starter's People

Contributors

kylpo avatar

Watchers

 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.