"The beginning is the most important part of the work."
-
React App Setup
- Traditional setup using
create-react-app
(CRA) - Modern setup using
Vite
for faster builds
- Traditional setup using
-
Project Structure Essentials
node_modules
— why it's important but excluded from Git.gitignore
— managing untracked files like dependencies
"Don’t just use React — understand how it works."
-
React App Setup Methods
- Create React App (CRA)
- Vite Setup
-
Core React & Project Structure
- JSX & Components
- Virtual DOM - basics overview
- Fragments
- Rendering Flow (index.html → JSX)
- Using CSS in React
-
React Behavior & Limitations
- Single Page Application (SPA)
- Mounting & Rendering
- SEO Challenges
- Server Side Rendering (SSR)
-
Tools & Terminology
- Babel, Webpack, ESBuild
- react-scripts, ReactDOM, CSR vs SSR
"To truly understand a tool, build a simpler version of it yourself."
-
custom-react-app
- Understanding how React works
- Creating our own render system (
customRender
) - Understanding our custom React element
-
vite-react-app
- How JSX really works (behind the scenes)
- What does
React.createElement()
do? - What is
React.render()
orcreateRoot().render()
? - Why JSX allows only expressions (not if/else or loops)
-
vite-react-app-2
- Discovering Hooks in React
- Why were Hooks introduced?
- What problems do Hooks solve?
- How does
useState
work? - What makes React more powerful than classical JavaScript?
"React updates like magic — only where it matters, only when it matters."
-
Virtual DOM
- What is Virtual DOM?
- Diffing and Updating the Real DOM
- Limitations of Virtual DOM
-
Fiber Architecture
- Why React Introduced Fiber
- How Fiber Works (Fiber Tree, Linked List)
- Benefits Over Virtual DOM
- Supports Concurrent Features
-
Reconciliation (Diffing)
- What is Reconciliation?
- How React Finds Differences
- Handling Lists with Keys
- Fiber’s Role in Reconciliation
"Learning to write programs stretches your mind, and helps you think better."
-
Tailwind CSS Setup with Vite
- Integrating Tailwind with React via Vite
- Docs Link: https://v3.tailwindcss.com/docs/guides/vite
-
Understanding Props in React
- Passing data from parent to child
- Using props in functional components
- Sending multiple values via a single prop
-
Understanding State Batching in Counter Component
- Updating state multiple times correctly
- Differences between direct updates vs. functional updates
"Every project starts with ‘Hello World’ and ends with ‘Why isn’t this working?!’"
- Background Changer App
- A simple React project built with
Vite
and styled usingTailwind CSS
. - It lets users change the background color by clicking on color buttons.
- A simple React project built with
"Build tools that save time and create delight—one line of code at a time."
-
Password Generator Project
- useState
- useEffect
- useRef
- useCallback
- Component Structure
-
Currency Converter Project
- useState
- useEffect
- useId
- Custom Hook (Calling & Handling API)
- Controlled Components
- Reusable Components
- Component Structure
- Folder Structure
"Routing gives your React app a sense of structure and navigation—without the reloads."
-
React Router DOM
- Purpose and Benefits of Client-Side Routing
- Creating a Multi-Page Feel in a Single-Page App
- Installing
react-router-dom
-
Creating Routes
- Approach 1: Route Array with
createBrowserRouter
- Approach 2: JSX-Based Routes with
createRoutesFromElements
- Using
<Route>
and<RouterProvider>
- Approach 1: Route Array with
-
Nested Routing & Layouts
- Creating a
Layout.jsx
Component - Using
<Outlet>
to Render Nested Pages - Shared Components like Header & Footer
- Showing Loading State with
useNavigation()
- Creating a
-
Routing Tools
- Using
<Link>
for Basic Navigation - Styling Active Links with
<NavLink>
and Tailwind CSS - Creating Dynamic Paths using
:params
- Accessing URL Parameters with
useParams()
- Using
-
Data Loading with Loaders
- Fetching Data Before Page Render
- Using
loader
Functions in Routes - Accessing Preloaded Data with
useLoaderData()
"Every bug is a step closer to mastery."
-
Context API: Approach 1 (Basics)
- Share data between components without passing props
- Setup context files inside src/context
- Manage state and provide data using a context provider
- Wrap components in the provider to access shared data
-
Context API: Approach 2 (Theme Switcher)
- Use context to manage light/dark theme globally
- Create context and custom hook for theme control
- Use a toggle button to switch themes
- Apply theme styles using CSS classes (Tailwind CSS)
-
Context API: Todo App + LocalStorage
- Manage todo list data globally with context
- Organize code with context and components
- Use localStorage to save todos across sessions
- Components update and display todos using shared context
"State is the heartbeat of your app — manage it well, and everything flows."
-
State Management Basics & History
- Purpose and importance of managing state
- Why we need state management
- Flux architecture and one-way data flow
- Introduction and improvements of Redux
-
Redux Ecosystem
- Redux core concepts
- React Redux integration (hooks like
useDispatch
,useSelector
) - Redux Toolkit for simplified usage
-
Core Building Blocks
- Store, Reducers, and Slices
configureStore
andcreateSlice
- Reducer parameters:
state
andaction
-
Supporting Utilities
Provider
component for store accessnanoid
for generating unique IDs
"Now building a full-fledged Blog Website with backend & database support using ReactJS and Appwrite."
-
Starting Mega Project: Blog Website
- Introduction to Full-Stack Blog Application Development
- Focus on ReactJS as the Frontend Framework
-
Backend-as-a-Service: Appwrite
- Handling Backend Functionality
- Database Integration and Management
-
Other's Pre-requisites
- Using
TinyMCE
for Rich Text Editing in React - Implementing
html-react-parser
to Render Stored HTML Content - Using
React Hook Form
for Efficient Form Management - Managing Environment Variables
- Using
"Building smart means building for flexibility and future growth."
-
Creating Vite App & Appwrite Integration
- Creating vite app & setup tailwind css
- Creaing appwrite account
- Creating database and storage bucket
- AuthService class for signup, login, logout, and user management
-
Environment & Configuration Setup
- Creating
.env
file for storing secrets (withVITE_
prefix) - Setting up
config.js
to manage environment variables centrally
- Creating
-
Package Installation
appwrite
,react-router-dom
react-redux
,@reduxjs/toolkit
,react-hook-form
@tinymce/tinymce-react
,html-react-parser
-
Code Architecture Best Practices
- Concept of Vendor Lock-in
- Using service classes to isolate backend logic and ensure flexibility
"Build the foundation well, and scaling becomes effortless."
-
Appwrite Service Class
- Continued backend integration using Appwrite
- New file:
src/appwrite/utils.js
- Define and export a
Service
class instance - Initializes Appwrite client with core properties:
databases
: handles blog post operationsbucket
: handles file storage
-
Post Management (CRUD)
- Methods:
createPost
updatePost
deletePost
getPost
getPosts
- Blog post fields:
title
,slug
,content
,featuredImage
,status
,userId
- Methods:
-
File Management
- Methods:
uploadFile
deleteFile
getFilePreview
- Methods:
"State management and clean component structure are keys to building scalable apps."
-
Redux Integration
- Setting up
store.js
withconfigureStore
- Creating
authSlice
withlogin
andlogout
reducers - Wrapping
App
withProvider
for store access
- Setting up
-
Routing Setup
- Using
BrowserRouter
to enable routing - Navigating with
useNavigate
- Routing-aware components like
Link
- Using
-
Component Architecture & Authentication Logic
- Reusable components:
Header
,Footer
,Container
,Input
,Button
,LogoutBtn
,Logo
- Barrel export using
index.js
for simplified imports - Login status check on app load using
useEffect
andauthService
- Conditional rendering based on authentication state
- Logout functionality with Redux dispatch
- Reusable components:
"Build once, reuse everywhere – with secure access and clean structure."
-
UI Components
Select
: Reusable dropdown withforwardRef
and TailwindPostCard
: Blog post preview with image and routing
-
Auth Forms & Protected Routes
- Forms
Login & Signup
built withreact-hook-form
- Redux for storing user state
- Navigation with
useNavigate()
- Error handling and redirects
AuthLayout
: Protects routes based on login status
- Forms
-
Form & State Utilities
React Hook Form
: Unified input handling (useForm
,register
)Redux Toolkit
: Manages auth state (useDispatch
,useSelector
)Regex
: Validates email structure in forms
-
External Services
Appwrite
: Handles auth and image previewsReact Router
: For all navigation (Link
,useNavigate
)
"Focus on writing clean, reusable components to scale your project efficiently."
-
TinyMCE Editor with React Hook Form
- Integration of TinyMCE as a Rich Text Editor (RTE)
- Custom toolbar, plugins, and styling
- Controlled using
Controller
fromreact-hook-form
-
Post Form to Create and Edit Posts
- Form setup for both creating and editing blog posts
- Includes fields like Title, Slug, Content, Image, and Status
- Uses TinyMCE as the content input
-
Important Concepts
- React Hook Form:
useForm
,Controller
,handleSubmit
,watch
,setValue
- Slug Generator: Converts titles to URL-friendly slugs
- Image Upload with Appwrite: Handles new uploads and updates
- Post Logic: Conditional create or update using Appwrite services
- React Hook Form:
"Structure brings clarity. Clarity brings progress."
-
Pages Structure
- Folder setup under
src/pages
- Created main page components (Login, Signup, Home, etc.)
- Each page linked via React Router
- Folder setup under
-
Page Descriptions
Login.jsx
– Login form using componentSignup.jsx
– Signup form with inputsHome.jsx
– Displays blog post listAllPosts.jsx
– Loads all blog postsEditPost.jsx
– Allows editing a post via IDPost.jsx
– Shows full post details and actions
-
React Router Setup
- Routing defined in
main.jsx
- Used
createBrowserRouter
fromreact-router-dom
- Routes for Home, Login, Signup, AllPosts, EditPost, Post
- Protected and public routes with
AuthLayout
- Routing defined in
-
AuthLayout (Protected Routes)
- Guards routes based on auth state
- Redirects users accordingly
- Uses Redux
useSelector
for checking login - Handles access for both logged-in and logged-out users
"Debugging is twice as hard as writing the code in the first place."
-
Start Running the App
- First time run the full app after 7 days of code
- Encountered multiple runtime errors and bugs
-
Debug and Fix Major Errors
- Systematic error tracking and resolution across various files
- Add
<Outlet />
in App.jsx - Wrong Import Path in main.jsx
- TinyMCE API Key Setup in RTE.jsx
- Image Preview Error:
- Switched from
getFilePreview()
togetFileView()
- Appwrite Storage Permission Settings for public access
- Switched from
-
Debug and Fix Minor Errors
- Resolved various import, folder, and typo issues
- Refer to GitHub commits history for full list
"Code is like humor. When you have to explain it, it’s bad."
-
API Fundamentals
- What is an API
- Role in frontend-backend communication
-
Working with APIs in React
- Fetch vs Axios comparison
- Axios GET request with then() & catch()
- Best practices (useEffect, useState, error handling)
-
Handling CORS Issues
- What is CORS
- Proxy setup in Vite
- Backend solutions (cors package, headers)
"Backend and frontend must work in harmony to deliver seamless experiences."
-
Express Server Setup & Axios
- Creating a basic Express.js server
- GET endpoint at
/api/products
with optionalsearch
query - Benefits of using Axios for API calls
- Professional handling of requests, errors, and configurations
-
Method 1: Basic API Call using Axios
- Component:
Handle_API_1
- Basic useEffect pattern for API calls
- Handles loading, error, and data states directly in component
- Component:
-
Method 2: Using a Custom Hook
- Component:
Handle_API_2
- Custom hook:
useProductsAPIs
- Cleaner component code and reusable API logic
- Component:
-
Method 3: API Call with Search and Cancel Feature
- Component:
Handle_API_3
- Dynamic search handling with
AbortController
- Preventing race conditions and cancelled request issues
- Component: