Please enable JavaScript.
Coggle requires JavaScript to display documents.
React Native (Write your ios/android App using Javascript (Install React…
React Native
Write your ios/android App
using Javascript
Install React Native
(Windows, Linux, Mac)
Install on MacOS
Install Xcode, Android Studio, JDK8
Install nodejs, watchman
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
Install React Native Command Line Interface:
npm install -g react-native-cli
Create & run a blank project:
react-native init MyApp --version 0.60.0
Latest version:
react-native init MyApp
cd MyApp
react-native run-android
pod install
open MyApp.xcworkspace //run in Xcode
Basic Javascript: See React.js mindmap
State & props => See React.js mindmap OR HERE !
Custom Components
Component as "a Class"
Component as "a Function"
Component as "a Class" = Stateful "Component"
2 more items...
Component as "a Function" = Stateless Component:
Basic Components
Text:
"Editable Text" = TextInput
1 more item...
Button
alert a string:
1 more item...
Image:
Show image from your mobile or URI
Image from your mobile:
1 more item...
FlatList, SectionList
SectionList, like Settings Screen
1 more item...
FlatList.Eg: List of Notes, Products, Places
Main props: data, renderItem(each row), keyExtractor(what is "primary key" ?)
Want to make "Grid View":
1 more item...
ReactNavigation
What is StackNavigator ?
Import react-navigation :
1 more item...
Realtime DB with Firebase:
Login to Firebase console, create project
Download GoogleService-info.plist, save to ios
Drag this file to ios project
1 more item...
Call api in React Native
(using fetch or axios)
npm install --save axios
2 more items...
For Android Studio:
Install Android SDK/Platform
Intel @ HXAM
(Intel Hardware Accelerated eXecution Manager)
Android Virtual Device
Android SDK Platform 28
Intel x86 Atom_64 System Image
Add local.properties in Android:
Open terminal, nano $HOME/.bashrc
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
For ios, open Xcode, Preferences, Locations:
Install cocoapods:
sudo gem install cocoapods
Install on Windows
Cannot install Xcode ! => cannot run ios app
Install nodejs, python 2.7, JDK8, Android Studio
Configure Environment Path:
ANDROID_HOME: ~/AppData/Local/Android/Sdk
platform_tools: ~/AppData/Local/Android/Sdk/platform-tools
In local.properties:
Reactive with MobX
Object reference and changes/updates realtime
An object has some observable "properties":
"Observable props" changes => Component changes
If Component is a "function":
A "Todo" object changes => todos [] also changed
Todolist like "Generics Class" !
Obsevable List changes => "computed" methods changes:
if this function changes, notify:
Name: Nguyen Duc Hoang
Youtube:
https://www.youtube.com/c/nguyenduchoang