cilck to visit web site https://sushantworld.github.io/Sushant-World/
Window + Alt + r = video record
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/Sushantgodase10/Sushant-World.git
git push -u origin main
git remote add origin https://github.com/Sushantgodase10/Sushant-World.git
git branch -M main
git push -u origin main
1 git checkout US-SkeletonUI
2 git pull
3 git checkout master
4 git pull
git merge master
Install firebase cli - npm install -g firebase-tools
Firebase Login - firebase login
initilize Firbase - firebase init , and then select Hosting
npm run build
Deploy command - firebase deploy
=> npm does have a full from but npm not a node pakage manager , npm manage a pakage but does not stand node pakages manager
Ans=>
npm init
name": "sushant-world-web", "version": "1.0.0", "description": "Thisis Sushant World Web by Sushant Godase", "main": "App.js", "test": "jest" "repository": { "type": "git", "url": "git+https://github.com/Sushantgodase10/Sushant-World" }, "keywords": [], "author": "Sushant Godase", "license":
Two Type Dependency Package
1) dev Dependencie Package => it is general required for development phase
2) normal Dependencie Package
=> use in production also
npm install -D parcel
push a git its impt
npx parcel index.html to create a app host in server
Server running at http://localhost:1234
npx if we executive a parcel
1) npm install react
what is npm ? => npm does have a full from but npm not a node pakage manager , npm manage a pakage but does not stand node pakages manager
-There Is Normal JAVA Script Function (Normal JS utility functions)
-> Are browser blocker to calling api from one origin to different origin , if there is origin mismatch the browser block this api call that is a cors policy. https://www.youtube.com/watch?v=tcLW5d0KAYE
Add CORS Extension
Allow CORS: Access-Control-Allow-Origin
-> A shimmer UI is a version of the UI that doesn't contain actual content, but instead mimics the layout and shapes of the content that will eventually appear
(Normal JS utility funcation)
useState() - Superpowerful state Varibales in react
useEffect()
Why it's Single page Application => it just one just componenet it's changes
Clinet Side Routing => Client-side routing refers to the practice of handling navigation and page rendering on the user's device, enhancing web application interactivity.
Server Side Routing => We mak network call and that page tha about HTML comming form server is called Server Side Routing.
=> now i'am import my useEffect form react library(this a name imported) so spik vluve code,and the we have useEffect hooks over here which have 2 argument 1) 1 st is callback funcations and
2) 2 ed it is a offional argument keep emty what happen .if have don't any Dependencie array over here than this useEffect we call every time my component render,
do have meak every time my api call render it's no
no it's fu lesh , i just have do it ones and initial remnder i will just use a emty Dependencie array
what is the life cycle of this react component
After each and evary render is my useEffect fucations will called
=> After first render ccomponentDidMount is called
and after sub equla render it's componentDidUpdate is called ther is diffreance between DidMount and DidUpdate
Testing a react appliaction as soon as the user land on the website to the user leave on the website. we will test the all this flows. we test diffrent of the flow.
React Testing Library
https://testing-library.com/docs/react-testing-library/intro/
npm install --save-dev @testing-library/react
Install Jest
Configure parcel Config file to disable defult babel transpilation
Jest Configuration
node jsdom (browser-like) press inter
- Select to jsdom (browser-like) press inter Q - Do you want Jest to add coverage reports? » (y/N)
- Yes Q - Which provider should be used to instrument code for coverage? » - Use arrow-keys. Return to submit. v8 babel
- Select to babel Q - Automatically clear mock calls, instances, contexts and results before every test? » (y/N)
- Yes
Install JSDon / js dom library
test is called as dunder
Install the
Install the