lộ trình học React
Giới thiệu về React
What is React?
Understanding Single Page Applications (SPA)
Why Use React?
Applications of React
How React is Fast: Virtual DOM & Reconciliation
Thiết lập môi trường
Node.js and NPM/Yarn
Installing Node.js and a Package Manager
Understanding
package.json
andpackage-lock.json
Choosing a Bundler
Parcel vs. Vite vs. Create React App (CRA)
Setting Up a React Project
Development vs. Production Dependencies
- Understanding Caret (^) and Tilde (~) Signs in
package.json
- Understanding Caret (^) and Tilde (~) Signs in
Tooling
Setting Up ESLint and Prettier
Using Git for Version Control
Debugging Tools and Techniques
React cơ bản
Pure React
What is Pure React
Setting React CDN
React & React DOM
Defining and Creating React Elements
React Dom & Root
React.createElement & ReactDom.createRoot
Creating Hello World Program Using Pure React
React Components
Functional vs. Class Components
How to create your first React component
Component Composition: Nesting and Organizing Components
Export and Import in React
JSX – JavaScript XML
Understanding JSX and Its Syntax
Converting HTML to JSX
JSX Rules: Single Root Element, Closing Tags, camelCase
Babel
JSX Using curly braces
Props in React
Introduction of Props
Passing Props to a Component
Receiving props in the Component
The default value for a prop
JSX Spread Syntax and Forwarding Props
Passing JSX as Children
Attributes & props
Passing data from child to parent
Conditional Rendering
Using Ternary Operators in JSX
Logical AND in JSX
Returning
null
for Conditional Rendering
Rendering Lists
Rendering Lists from Arrays
Mapping Arrays to JSX
Understanding
key
Prop and Its ImportanceFiltering Arrays
React chi tiết
Handling Events in React
Event Handlers
Reading props in event handlers
Passing event handlers as props
Event Propagation
Preventing Default
State Management
Introduction to State and useState Hook
State as Component Memory
Multiple State Variables and Isolated State
Objects Update in State
Arrays Update in State
Khái niệm nâng cao
Understanding Pure Components
Components as Formulas
Side Effects and Local Mutations
Your UI as a Tree
- Render Tree and Module Dependency Tree
Component Reusability and Composition
- Config-Driven UI Design
Component Lifecycles:
- Understanding Render and Commit Phases
Hooks: A Deep Dive
React Router
Setting Up Routing in React
Nested and Dynamic Routes
Programmatic Navigation
Handling 404 Pages and Redirects
Practical Assignment: Build a multi-page application with dynamic routes (e.g., a blog with individual post pages).
State management and contex
Lifting State Up
- Sharing State Between Components
Avoiding Prop Drilling
- Using Context for Deeply Nested Components
Reducers and Context for Scalable State Management
Moving State and Dispatch to Context
Choosing Between useState and useReducer
Introduction to Redux (Optional)
- Integrating Redux for Large-Scale Applications
Practical Assignment: Implement a complex state management solution for a large application (e.g., an e-commerce site).
Advanced Topics
Error Boundaries
- Handling Errors Gracefully in React
Code Splitting & Lazy Loading
- Optimizing Load Times with Dynamic Imports
React Query for Data Fetching
- Efficient Data Fetching and Caching Strategies
TypeScript Integration (Optional)
Setting Up TypeScript with React
Typing Props, State, and Components
Introduction to Server-Side Rendering (SSR) with Next.js
Static Site Generation (SSG)
Progressive Web Apps (PWA)
React Native for Mobile Development
Practical Assignment: Create a performance-optimized application using code splitting and lazy loading.
Styling in react
CSS-in-JS vs. Traditional CSS
Styled Components, Emotion, Tailwind CSS
CSS Modules
Theming in React
Practical Assignment: Style an application using a chosen CSS-in-JS library and implement theming.
Testing in react
Introduction to Testing
Unit Testing with Jest
Testing Components with React Testing Library
End-to-End Testing with Cypress
Practical Assignment: Write unit and integration tests for an existing application.
Performance Optimization
Understanding React’s Reconciliation
Memoization Techniques
Optimizing Component Rendering
React's Concurrent Mode (Experimental)
Avoiding Unnecessary Renders
Optimizing Re-rendering with React.memo
Practical Assignment: Optimize the performance of an existing React application.
Building a Complete React Project
Project Setup and Structure
API Integration with Axios or Fetch
State Management with Context API or Redux
Routing with React Router
Form Handling and Validation
Testing Your Application
Deploying Your Application
Deployment Options: Vercel, Netlify, GitHub Pages
Best Practices for Production Readiness
Practical Assignment: Build and deploy a full-stack application (e.g., a social media dashboard).
Best Practices and Advanced Patterns
Writing Clean and Maintainable Code
Component Reusability
Accessibility in React
Security Practices
Advanced Component Patterns
Render Props
Higher-Order Components (HOCs)
Compound Components
Practical Assignment: Refactor an application using advanced component patterns and ensure accessibility.
Continuous Learning & Community Engagement
Following React’s Official Documentation
Staying Updated with Latest React Releases
Engaging with React Communities
- Reactiflux Discord, GitHub, Twitter
Contributing to Open Source
- Finding and Contributing to Open Source React Projects