REACT JS ADONS 1 javascript (ES6) code snippets 2 Live Sass Compiler 3 Live Server 4 ES7+ React/Redux/React-Native snippet ----------------------------------------------------------- React Library 1) npm install react-bootstrap bootstrap https://react-bootstrap.netlify.app/docs/components/buttons/ // bootstarp file add this file in index.js import 'bootstrap/dist/css/bootstrap.min.css'; 2) npm install react-router-dom 3) npm install react-axios install The Postman app in your system https://www.postman.com/downloads/ 4) npm i redux react-redux redux-thunk ----------------------------------------------------------- youtube link https://www.youtube.com/watch?v=EHTWMpD6S_0&t=91s https://www.youtube.com/playlist?list=PL8p2I9GklV47BCAjiCtuV_liN9IwAl8pM https://www.thapatechnical.com/2021/07/react-js-1702-in-one-video-by-thapa.html npx = (Node Package Execute) npm = (Node Package Manager) ----------------------------------------------------------- section 4: STATE ===> data ko store karane ka liye STATE ===> just like a object, we store data in STATE state update in COMPONETN when we change jab hum state ko change/update karte hai to component ko pata chal jata hai kuch update ua hai VAR ke kesh me aisa kuch nahi hota PROPS ===> data ko transfer karne k liye 1 component se 2 component me data bhejne k liye ************************************************************************* COMPONENTS CREATE ************************************************************************* 1) function components 2) class components ======== App.js page ============== import Header from './component/header.js' function App() { return (
); } ======== App.js page ============== 1) function components --------------------------------------------- import '../assets/css/header.css' function Header() { return (

HEADER

); } export default Header; 2) class components --------------------------------------------- import {Component } from "react" class Footer extends Component { render(){ return (
); } } export default Footer; ************************************************************************* WHAT IS JSX ************************************************************************* JSX = js + HTML let fname = "rakesh" const my_func =() =>{ return "this is my function value"; } function JSX(){ let lname = "kumar" return (

jsx = javaScript + HTML - {fname} {lname} - {2*5} - {my_func()}

); } export default JSX; section 5: ************************************************************************* PROPS IN REACT ************************************************************************* 1) Props in function component 2) Props in class component 3) Immutability of props 1) Props in function component ------------------------------------------- ========== app.js page ========
========== component page ======== function Header(props) { return (

HEADER {props.heanderName}

); } 2) Props in class component ------------------------------------------- ========== app.js page ========