Listing out some fundamental concepts in react for various workshops/hands-on coding sessions.
Check out my full React Tutorial
S.No | Topic | Event/YouTube link |
---|---|---|
1 | Understanding the Basics - JSX + State + Props | https://www.youtube.com/playlist?list=PLGyA74h_S9NqJvvQ7-l9bUHHS6bMCkgo0 |
2 | Lifecycle Methods + Making Network Requests | https://www.youtube.com/playlist?list=PLGyA74h_S9NppHNrzUSjMQbnuHS9jlAcY |
3 | Understanding Flexbox | https://www.youtube.com/playlist?list=PLGyA74h_S9NrkKnaIrYeOolru4EakosHY |
4 | React + TypeScript | https://www.youtube.com/playlist?list=PLGyA74h_S9NrjM7mUiSmpKfUntwEcgMB3 |
5 | React Portals | https://www.youtube.com/playlist?list=PLGyA74h_S9Nq-rRLG5pqEiaJ87H22S3BW |
npx create-react-app playground
cd playground
npm start
- Why React?
- React Components
- Sample Component Architechture
- One Way Data Flow In React
- JSX
- State
- Props
- Lifecycle Methods
- React Hooks
- lifecycle methods vs useEffect
- Fast Learning Curve
- Reusable components
- Fast Render with Virtual DOM
- Great Dev Tools
- Great Dev Community
- Proper Modularization
- Clean Abstraction
- React Native, React Desktop
See the app in action here: http://madhavbahl.tech/react-pokedex
Let's build a counter app!
Let's you use state in functional components
const [ state, setState ] = useState<StateSchema>(initialState)
Similar to lifecycle methods, but different :D
useEffect(() => {
// Method you wish to run
}, [dependencyArray]);
Different cases of dependency array
Runs at the initial render only!
useEffect(() => {
console.log ("This will run at initial render of the component only")
}, []);
- runs at initial render
- runs whenever
data
changes
useEffect(() => {
console.log ("This will run at initial render")
console.log (`This will also run when data - ${data} - changes`);
}, [data]);
- Runs at initial render
- Runs at every re-render
useEffect(() => {
console.log ("This is going to run initially + everytime when anything changes");
});