Git Product home page Git Product logo

nomadgrapp's Introduction

nomadgrapp

Cloning instagram App with React Native

Preloading

  • Before render apps, the resource files like (images, fonts...etc) must be loaded
import { AppLoading, Asset, Font } from "expo";
import { IonIcons, MaterialIcons } from "@expo/vector-icons";

const { isLoadingComplete } = this.state;

if (!isLoadingComplete) {
  return (
    <AppLoading
      startAsync={this._loadAssetsAsync}
      onError={this._handleLoadingError}
      onFinish={this._handleFinishLoading}
    />
  );
}

_loadAssetsAsync = async () => {
  return Promise.all([
    Asset.loadAsync([require("./assets/images/logo.png")]),
    Font.loadAsync([...IonIcons.font, ...MaterialIcons.font]),
  ]);
};
_handleLoadingError = error => {
  cosole.log(error);
};
_handleFinishLoading = async () => {
  this.setState({
    isLoadingComplete: true,
  });
};

Persist the Redux store on phone

  • Restore app data(redux) on phone storages.
# use npm instead of yarn(yarn occure unexpected errors)
# redux-persist do store redux data on phone storage
]$ npm install redux-persist redux-thunk react-redux redux --save
  • Import redux persist modules
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/es/integration/react";
import configureStore from "./redux/configureStore";

const { persistor, store } = configureStore();
  • PersistGate do wait until load all redux data from storage.

Create AppContainer

]$ npm install prop-types --save

Navigation

  • Application is different from web.

    Don't have link, url change, refresh...

  • Use React Navigation

  • See React Navigation Docs

  • There is two kind of navigation.

    1. Tab navigation

      Same depth each containers

      Tabs are next each other

    2. Stack navigation

      There exist depth each containers

      Screen exist top of the other one. Cover each other

      Has Two Mode. Screen and popup modal

]$ npm install --save react-navigation

Ionicons

import Ionicons from "@expo/vector-icons";

TextInput underlines on android

  • When appears underlines in TextInput on Android, then add this code on TextInput's props
underlineColorAndroid = "rgba(0,0,0,0)";

Localhost django api server to open

# run with your port that you want to share
]$ ngrok 8000
# Add ALLOWED_HOSTS config/settings/local.py
ALLOWED_HOSTS = ["*"]

Facebook login

Add host.exp.Exponent as an iOS Bundle ID. Add rRW++LUjmZZ+58EbN5DVhGAnkX4= as an Android key hash. Your app's settings should end up including the following under "Settings > Basic"

Standalone App

Install react-native-fade-in-image

  • It's for fade in animation to loading images
]$ npm install react-native-fade-in-image --save

Install react-native-fit-image

  • For search screen
]$ npm install react-native-fit-image --save

Action Sheet

  • Use Action Sheet with global settings or confirms..
  • And use on logout.
]$ npm install react-native-actionsheet --save
  • Need reference that is the way, can access to component with react

UUID

  • Install UUID for make file name
]$ npm install uuid --save

nomadgrapp's People

Contributors

chicrock avatar

Stargazers

 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.