/Edu-React-PTT.G02

Primary LanguageJavaScriptMIT LicenseMIT

Edu-React-PTT.G02 (React-PTT-v2)

The topics here are the titles of the lessons covered for React Course Group-02.

  • Day 01-03 Level-1 (React Introduction)

  • Day 04-07 Level-2 (Building Web Applications with React and Redux)

  • Day 08-09 Level-3 (Advanced React)


Create a Project To create a new React project, run the following command: npx create-react-app [... project name ...]

Run the Project To run the project, use the following command: npm start

Stop the Project To stop the project, press CTRL + C in the terminal.

Terminal Commands

  • Open a Folder: cd [... name / path ...]
  • Open the Parent Folder: cd ..
  • List Folders: ls
  • Clear the Terminal:
  • Windows: cls
  • Linux/MacOS: clear

Day01

  1. npx create-react-app [projectName] or .
  2. Folder Structure
  3. Component

Day02

  1. Summary
  2. Components
  3. JSX Field - JS Code Field - Class Field
  4. Using CSS (inline Style, external Style, Style File)
  5. Props
  6. PropTypes - PropTypes->shape
  7. Default Props
  8. State
  9. Events
  10. Bind
  11. React Developer Tools

Link for Chrome

Note: https://www.wappalyzer.com/ for web site technology analyzer

  1. Class vs Functional Component
  2. STATE - useState
  3. Import Logic
  4. Phone Book with Class Component
npx create-react-app phonebook

Day03

  1. Summary
  2. APP.1 - Phone Book with Class Component
  3. APP.2 - Phone Book with Functional Component
  • Create Project
  • Remove File/Code
  • Create Component Folder/Files (Contact-Form-List)
  • Import Components on DOM Node
  • Coding/Import Style /main.css
  • Coding Contact,List,Form Component
  1. Script fileds & Build Application
  2. Life Cycle
  • React Life Cycle Methods

https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/

  1. Life Cycle in Functional Component
  2. Hooks - useState, useEffect, useRef
  3. Exam

Day04

  1. Summary
  2. Fetch

Fake Data API: https://jsonplaceholder.typicode.com/

  1. Axios
npm i axios
  1. Routes
npm i react-router-dom

[BrowserRouter , Link (to), Routes, Route (path,index, no match *,any text *, params :), Nested Route, NavLink ]

  1. Slide : DOM & Events
  2. APP.3 - Keyboard-events-app
  3. Higher Order Component (HOC)

Day05

  1. Summary
  2. HOC
  3. Reausable HOC
  4. Pure Component
  5. Context API (context-sample project)
  6. Promise Slide & Coding
  7. Slide : Redux (redux-sample project) - Modern Redux

Store - dispatch(action) - action=>{type:'...',payload:'...'} Reducer (Store_Brain-State_Management-State_Object) - subscribe

  1. Redux Flow Chart : reduxjs/redux#653
  2. Introduction to Redux
    npm install redux
    
  3. Counter with Redux Core
  4. redux devtools extension
  5. Modern Redux - Redux Toolkit

SRC::: https://redux.js.org/tutorials/essentials/part-2-app-structure

npx create-react-app [my-app] --template redux

Day06

  1. Summary

  2. Install Redux Toolkit

  3. Using Modern Redux

    createSlice (userSlice.js) create/configure Store (App/store.js) Provide Store for all Components (index.js) useDispatch / useSelector (Component=> User.js)

  4. Thunk Middleware

  5. Using Redux Tookit Template

  6. Second parameter (thunkAPI) in createAsyncThunk

  7. Final Project for React Traning - MovieApp

Day07

  1. Summary

  2. Slide : Building Web Applications with React and Redux

  3. MovieApp (Project Continue)

    • Create React app With Redux Template
    npx create-react-app movie-app --template redux
    
    • Install Semantic UI
    npm install semantic-ui-react semantic-ui-css
    
    - import Semantic UI CSS in index.js
    ```
    import 'semantic-ui-css/semantic.min.css'
    ```
    
    npm i react-router-dom  
    
    - Using BrowserRouter (index.js)
    - Using Link (HeaderSection.js)
    - Using Routes/Route (RootRouter.js)
    - Import RootRouter in HomePage.js
    
    • Using Message Component From SemanticUI for Home/404 JSX Code (RootRouter.js)
    • Using RTK - Create Slice File (movieSlice.js) with rxslice
    • import reducer to Store (store.js)
    • Using mockApi.io
    • Create base Axios Instance (/API/axiosConfig.js)
    • Coding FetchMovie method in Slice (MovieSlice.js)
    • Using FetchMovie in Slice ExtraReducer (MovieSlice.js)
    • Get data from Store in MovieList.js
    • Create CardComponent
    • Coding CreateMovie method in Slice (MovieSlice.js)
    • Using CreateMovie in Slice ExtraReducer (MovieSlice.js)

Day08

  1. Summary
  2. Source Book (Handbook)
  3. Table of Content
  4. Introduction to React Native
  5. Introduction to TypeScript
  • tsrnf || tsrnc || rnf || rnc
  • View, Text, SafeAreaView, Props, State, LifeCycle Methods, Events - TwoDataBind
  • Alert.alert, Alert.prompt, Button, TouchableOpacity, TouchableHightlight, ScrollView, FlatList
  • style- stylesheets, ActivityIndicator,Dimensions, Platform
  1. ActivityIndicator - ReactNative-Navigator
  2. JSPromise
  3. Lazy (npx create-react-app lazy-suspense-sample)
  4. Suspense
  5. React Fragment=> <> ... </>
  6. i18n l10n Note: https://www.merixstudio.com/blog/internationalization-i18n-localization-l10n-react-apps/?utm\_source=facebook&utm\_medium=social&utm_campaign=posting
npm i react-intl
  1. Isomorphic
  2. NextJS
  • node -v || node --version
npx create-next-app
  • npm run dev
  1. Final-Project

Day09

  1. NextJS snippets
  2. npx create-next-app lesson-sample
  • cd xxxPath-Urlxxx && npm run dev
  1. Routes
  • static route => Folder/page.js
  • dynamic route => [Folder]/page.js
  • using params => props.params.XXParameterNameXX
  • Catch All Routes => [...Folder]/page.js
  • Multiple Routes static+dynamic
  • Optional catch-all Routes => [[...Folder]]/page.js
  • Route Group => (GroupName)/Folder
  1. Link
  • src
  • prefetch
  • replace
  1. app-Folder
  • jsx, js, tsx
  • layout.js => children,...res
  • page.js
  • loading.js
  • error.js
  • notFound() => not-found.js
  1. pages/404.js | pages/500.js
  2. Search Params => props.searchParams => Query Params Params => props.params => STD Params
  3. Data Fetch (fetch/axios)
  • fetch => next: {revalidate: 1000}
  • Promise.All
  1. "use client" --- "use server"
  2. Images
  1. Fonts
  2. Script
  3. Tailwind CSS
  4. FlowBite
  5. Final-Project npx create-next-app finalproject
  • cd xxxPath-Urlxxx && npm run dev
  • head.js
  • styles
  • reset.css (https://meyerweb.com/eric/tools/css/reset/)
  • global.css
  • React Icons [npm i react-icons]
  • components/header/index.js && components/header/styles.modules.css
  • components/footer/index.js && components/footer/styles.modules.css (https://symbl.cc/en/)
  • .env
  • services/movie.js
  • Loading

Live Share Link;
https://prod.liveshare.vsengsaas.visualstudio.com/join?AEE0B2CCAD60DC7E5CE9F778D236A52729CA