- Nodejs: https://nodejs.org/en/ (Cài bản LTS)
- Yarn (https://yarnpkg.com/lang/en/docs/install/#windows-stable)
- Java SDK 8: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Visual Studio Code: https://code.visualstudio.com/Download
- Git SCM: https://git-scm.com/download/
- https://chocolatey.org (For Windows)
- Xcode, Android Studio: https://developer.android.com/studio/
- Setup ANDROID_HOME (c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk)
- Add platform-tools to Path (c:\Users\YOUR_USERNAME\AppData\Local\Android\Sdk\platform-tools)
- Setup JAVA_HOME (https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html)
- Auto Rename Tag: (Downloads: 2.7M)
- Bracket Pair Colorizer 2 (Donwloads: 842K)
- ES7 React/Redux/GraphQL/React-Native snippets (Downloads: 1.3M)
- Visual Studio IntelliCode (5.1M)
- ESLint (8.9M)
- React Native Tools (Downloads: 1.2M)
- Prettier - Code Formatter (Downloads: 6.3M)
- Debugger for Chrome (Downloads: 15.4M)
- Material Icon Theme (Downloads: 5M)
- One Dark Pro (Downloads: 7.8M)
- Hello World
- Introduction JSX
- Render Elements
- Components & Props
- Typechecking With PropTypes
- State & Lifecycle
- Handling Events
- Conditional Rendering
- List & Keys
- Refs and the DOM
npx create-react-app my-app
cd my-app
npm start
https://github.com/ngothanhtung/ReactNative-Tutorials/tree/master/Batch07/my-react-web
- https://reactnative.dev/
- https://reactnative.dev/docs/getting-started
- https://reactnative.dev/docs/environment-setup
Get started: Select tab: React Native CLI Quickstart
npx react-native init AwesomeProject
cd AwesomeProject
npx react-native start
- npm install -g react-native-cli
- Create new react native project: react-native init HelloWorldApp
- Component Examples: https://facebook.github.io/react-native/docs/tutorial
-
Props:
-
Type-Checking:
Ref: https://reactjs.org/docs/typechecking-with-proptypes.html
Install Package: https://www.npmjs.com/package/prop-types
-
Handle Event within state:
-
Handling Touches: https://reactnative.dev/docs/handling-touches
- https://reactjs.org/docs/state-and-lifecycle.html
- Theory: https://reactjs.org/docs/react-component.html
- Diagram: http://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/
- add react-native-vector-icons
yarn add react-native-vector-icons
Open: android/app/build.gradle
Go to end of file: paste: apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
-
Height and Width: https://facebook.github.io/react-native/docs/height-and-width https://facebook.github.io/react-native/docs/dimensions
-
Layout with Flexbox: https://facebook.github.io/react-native/docs/flexbox
-
ImageBackground: https://reactnative.dev/docs/imagebackground
-
StatusBar: https://reactnative.dev/docs/statusbar
-
Packages:
react-native-vector-icons: https://github.com/oblador/react-native-vector-icons
https://github.com/react-native-community/react-native-linear-gradient
react-native-svg
Browse Icons: https://oblador.github.io/react-native-vector-icons/
Face Stock: http://pravatar.cc/
Stock: http://thestocks.im/
- ScrollView: https://reactnative.dev/docs/using-a-scrollview
- ListView: https://reactnative.dev/docs/using-a-listview
- FlatList: https://reactnative.dev/docs/flatlist
- SectionList: https://facebook.github.io/react-native/docs/sectionlist
- Networking: https://facebook.github.io/react-native/docs/network
- Fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
- Axios Package: https://github.com/axios/axios
- JSON samples: https://jsonplaceholder.typicode.com/
- Download POSTMAN Tool: https://www.getpostman.com/postman
- API Practices:
- https://training.softech.cloud/api/users
+ Method: GET
- https://training.softech.cloud/api/users/login
+ Method: POST
+ Body: {"email": "youremail@gmail.com", "password": "123"}
- https://training.softech.cloud/api/users/register
+ Method: POST
+ Body: {"email": "youremail@gmail.com", "password": "123", "fullname": "Your Name"}
- Notes: POSTMAN: Method: POST, Body: Raw => JSON
- Basic Hooks
- useState
- useEffect
- Additional Hooks
- useCallback
- useMemo
- useRef
- Advanced Hooks
- useContext
- useReducer
-
Setup (Important):
-
StackNavigation
-
TabNavigation
https://reactnavigation.org/docs/material-bottom-tab-navigator
-
DrawerNavigation
-
Nesting Navigatord
- React Native Papers
- React Native Elements
- NativeBase
- AsyncStorage (https://github.com/react-native-community/async-storage)
- moment / numeral / lodash
- Working with form: Formik (https://jaredpalmer.com/formik/docs/guides/react-native)
- Working with entry data validation: Yup (https://github.com/jquense/yup)
- KeyboardAvoidingView: https://reactnative.dev/docs/keyboardavoidingview
- https://firebase.google.com/
- Register a Google account
- React Native Firebase: https://rnfirebase.io/
- Basic: http://invertase.link/get-started-basic
- Download sourcecode (ZIP)
- Unzip
- Install packages: Root project: type: npm install / yarn install
- Root project: type: npm run rename, project name: jobs, company name: softech
- Package name: com.softech.jobs
- Add Google Services files (plist & JSON):
- Login: https://console.firebase.google.com/ (email / password)
- Add firebase project: project name: softech - jobs
- Go to project dashboard
- Go to project setting: Project Overview -> Setting Icon -> Project settings
- Add mobile app: Your apps -> Select android app -> type package name: com.softech.jobs, app name: Softech Jobs -> Click Button [Register app]
- Download config file: Root project / android / app / google-services.json
- Run project: react-native run-android
Continue: README of this project
- Dashboard -> Database -> Filestore
- Start in test mode -> Click button [Enable]
- https://rnfirebase.io/docs/v5.x.x/getting-started
- https://firebase.google.com/docs/firestore/manage-data/structure-data
- Cloud Firestore: https://firebase.google.com/docs/firestore/quickstart
- Query Data: https://firebase.google.com/docs/firestore/query-data/queries
- Get Data: https://firebase.google.com/docs/firestore/query-data/get-data
- Add / Update Data: https://firebase.google.com/docs/firestore/manage-data/add-data
- Delete Data: https://firebase.google.com/docs/firestore/manage-data/delete-data
- Realtime Update: https://firebase.google.com/docs/firestore/query-data/listen
- Dashboard -> Authencation -> Sign-in Method -> Enable: Email / Password, Phone
- Docs: https://rnfirebase.io/docs/v5.x.x/auth/getting-started
- Refs: https://rnfirebase.io/docs/v5.x.x/auth/reference/auth
- Phone Authentication:
- Dashboard -> Authencation -> Sign-in Method -> Phone numbers for testing (optional)
- Get SHA-1 key: https://stackoverflow.com/questions/27609442/how-to-get-the-sha-1-fingerprint-certificate-in-android-studio-for-debug-mode
- Dashboard -> Project Settings -> General -> Select Android App -> Paste SHA-1
- Setup firebase tools:
- npm install -g firebase-tools
- yarn add global firebase-tools
- Login / Logout: firebase login / firebase logout
- Init project: (Project folder)
- Terminal: firebase init =>
- OPTIONS: => Choose Cloud Function =>
- OPTIONS: => Choose Project =>
- OPTION: => Choose Language => Javascript
- SELECT DEFAULTS
- OPTIONS => DONE
- Hello Function: Uncomment
- Deploy: firebase deploy
- Test API
- Theory: https://redux.js.org/introduction/getting-started
- Usage with React: https://react-redux.js.org
- Diagram: https://kuanhsuh.github.io/2017/09/28/What-s-Redux-and-how-to-use-it/
- Install packages: redux, react-redux,
- (npm install --save redux),
- (npm isntall --save react-redux),
- (npm isntall --save --dev redux-devtools-extension)
- Coding:
- types (constants)
- actions
- reducers
- components
- root reducers (store.js)
- store (store.js)
- App.js (config Provider with store)
- Debug:
- Download tool: https://github.com/jhen0409/react-native-debugger/releases
- redux-thunk
- Install: npm install --save redux-thunk
- Actions: PENDING, SUCCESS, ERROR
- Async Action (axios / fetch)
- Config middleware (store.js)
- redux-saga
- Install: npm install --save redux-saga / yarn add redux-saga
- sagas
- rootSagas
- Expressjs: https://expressjs.com/en/starter/generator.html
- Basic Routing: https://expressjs.com/en/starter/basic-routing.html
- Routing: https://expressjs.com/en/guide/routing.html
- Mongodb: https://www.mongodb.com/download-center/community
- Tools: https://www.mongodb.com/download-center/compass
- Others: RoboMongo: https://robomongo.org/
- Nodejs Mongodb Driver: http://mongodb.github.io/node-mongodb-native/3.1/
- Databases with Express: https://expressjs.com/en/guide/database-integration.html
- Android icon: https://romannurik.github.io/AndroidAssetStudio/index.html
- iOs icon: https://appicon.co/
- https://facebook.github.io/react-native/docs/signed-apk-android
- https://play.google.com/apps/publish
- react-native-firebase
- rnfirebase.io
- react-navigation
- npm install --save react-navigation
- npm install --save react-native-gesture-handler
- react-native link react-native-gesture-handler
- react-native-vector-icons
- npm install --save react-native-vector-icons
- react-native link react-native-vector-icons
- redux-saga
- redux
- react-redux
- redux-saga
- UI: react-native-elements / react-native-paper / nativebase
- npm install react-native-elements --save
-
axios
-
Open File:
- Open Camera / Photos gallery
- Offical Site: https://expressjs.com
- Install CLI tool: https://expressjs.com/en/starter/generator.html
- Basic Routing: https://expressjs.com/en/starter/basic-routing.html
- Run server forever: http://pm2.keymetrics.io/ (npm install pm2 -g)
- Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Perfect for development (https://nodemon.io)
- Install CLI
- Create a project with express tool
- Run project: npm start
- All stocks: http://thestocks.im
- Font Icons: https://oblador.github.io/react-native-vector-icons
- Image Icons: https://www.flaticon.com
- Color: https://flatuicolors.com
- Face / Avatar: http://pravatar.cc
- Animatable (Animation): https://github.com/oblador/react-native-animatable