Course Content
React Mastery
React Mastery
1. Fundamentals of React and Component-Based UI
What Is React and Why Use It?Comparing SPAs and MPAs in Web DevelopmentHow React Works with the Virtual DOMIntroducing JSX for Writing HTML in JavaScriptBuilding Complex UI with JSX Rendering Elements in ReactChallenge: Render an Element in ReactUnderstanding React ComponentsPassing Data with Props in ReactChallenge: Create Functional ComponentsConditional Rendering in ReactChallenge: Implement Conditional Rendering β Chat NotificationChallenge: Implement Conditional Rendering β Bank AlertRendering Collections of Data in ReactChallenge: Display Data Collections in ReactReact Fundamentals Wrap-Up
2. Styling Techniques in React Applications
Introduction to Styling in ReactUsing Inline Styles in ReactApplying Inline Styles in PracticeChallenge: Use Inline Styles in a React ComponentStyling React Components with External CSSApplying External CSS in PracticeChallenge: Apply External CSS to a React AppUsing CSS Modules for Scoped Styling in React Organizing File and Folder Structures for StylesChallenge: Use CSS Modules in React Styling Techniques in React Wrap-Up
3. React Hooks and Context for State Management
Introduction to React Hooks and ContextManaging State with the useState HookChallenge: Toggle Visibility with useStateWorking with References Using the useRef HookChallenge: Build a Controlled Form ComponentHandling Side Effects with the useEffect HookChallenge: Fetch and Display Data with useEffectOptimizing Performance with the useMemo HookChallenge: Implement a Car List Filter with useMemoSharing State Across Components with ContextUsing Context in a Real-World ScenarioChallenge: Build a World of Astronomy App with ContextReact Hooks and Context Wrap-Up
Starting and Running a React Project with Vite
Step 6: Initialize the Project
To set up the project, use the terminal. Open the terminal in your code editor (if it's not already open), run the following command, and press Enter:
python
When prompted, select React as the framework using the arrow keys:
Then, choose either JavaScript or TypeScript, depending on your preference:
After the setup is complete, Vite will prompt you to install dependencies. Run the following command:
python
Once the installation is done, start the development server by running:
python
After running these commands, you'll see a local development URL β typically: http://localhost:5173/
. You can open this link in your browser to view the app live.
Step 7: Begin Customizing
The project is set up, you can begin customizing it:
- Your main work will happen inside the src folder;
- You'll find default files like
App.jsx
andmain.jsx
, which you can modify or replace based on your project's needs; - If you worked previously in CodeSandbox, recreate your familiar structure: ensure you have a
main.jsx
(the Vite equivalent ofindex.js
) as the entry point and build your main application inApp.jsx
; - Create additional folders as needed to organize your components, styles, and assets.
Everything was clear?
Thanks for your feedback!
SectionΒ 4. ChapterΒ 5