Edit in StackBlitz next generation editor ⚡️
https://stackblitz.com/~/github.com/PoojaSwami3010/namastedev-react?file=README.md
#two type of import export
-default Export/Import
export default ComponentName
import ComponentName from '../path'
-Named Export /Import export const Component; import {Component} from '../path'
#React Hooks (normal JS utility Functions) useState() useEffect()
#Two types routing in web apps
client side rotuing server side routing
#React fiber https://github.com/acdlite/react-fiber-architecture
useEffect(callbackFunction,dependencyArray)
#React Lifcycle https://projects.wojtekmaj.pl/react-lifecycle-methods-diagram/
#github api api.github.com
Material Ui
Bootstrap Ui
Chakra UI
Style components
Ant Design
Tailwind css
-install libraries @reduxjs/toolkit , react-redux
-npm i @reduxjs/toolkit
-npm i react-redux
-Build our store
-Connect Store to our app
-Create Cart Slice
-Dispatch action
-Read data using Selectior
React testing library
https://testing-library.com/docs/react-testing-library/intro/
npm install --save-dev @testing-library/react
https://jestjs.io/docs/getting-started
npm install --save-dev jest
npm install --save-dev babel-jest @babel/core @babel/preset-env
-Unit Testing
-Integration testing
-End to end testing - e2e testing
Intsalled react testing library
intslled jest
installed babel dependecies
configure babel added babel.config.js file
https://parceljs.org/languages/javascript/#babel
configure parcelrc file To disable Babel transpilation in Parcel,
npm run test
Jest Configuration
npx jest --init
install jsdom library if jest version greater than 28 npm install --save-dev jest-environment-jsdom
install npm install --save-dev @babel/preset-react
Include @babel/preset-react into babelconfig
Install testing-library/jest-dom npm install @testing-library/jest-dom