[go: up one dir, main page]

0% found this document useful (0 votes)
596 views8 pages

React - The Complete Guide (incl Hooks, React Router, Redux)

Uploaded by

Sanan Afridi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
596 views8 pages

React - The Complete Guide (incl Hooks, React Router, Redux)

Uploaded by

Sanan Afridi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 8

Welcome To The Course!

What is React.js?
Why React Instead Of "Just JavaScript"?
Building Single-Page Applications (SPAs) with React
Exploring React.js Alternatives (Angular / Vue)
About This Course & Course Outline
The Two Ways (Paths) Of Taking This Course
Getting The Most Out Of This Course
Setting Up The Course Dev Environment (Code Editor)
Module Introduction
Understanding "let" and "const"
Arrow Functions
Exports and Imports
Understanding Classes
Classes, Properties and Methods
The Spread & Rest Operator
Destructuring
Reference and Primitive Types Refresher
Refreshing Array Functions
Wrap Up
Module Introduction
What Are Components? And Why Is React All About Them?
React Code Is Written In A "Declarative Way"!
Creating a new React Project
Analyzing a Standard React Project
Introducing JSX
How React Works
Building a First Custom Component
Writing More Complex JSX Code
Adding Basic CSS Styling
Outputting Dynamic Data & Working with Expressions in JSX
Passing Data via "props"
Adding "normal" JavaScript Logic to Components
Splitting Components Into Multiple Components
Time to Practice: React & Component Basics - Problem
Time to Practice: React & Component Basics - Solution
The Concept of "Composition" ("children props")
A First Summary
A Closer Look At JSX
Organizing Component Files
An Alternative Function Syntax
Module Introduction
Listening to Events & Working with Event Handlers
How Component Functions Are Executed
Working with "State"
A Closer Look at the "useState" Hook
Adding Form Inputs
Listening to User Input
Working with Multiple States
Using One State Instead (And What's Better)
Updating State That Depends On The Previous State
Handling Form Submission
Adding Two-Way Binding
Child-to-Parent Component Communication (Bottom-up)
Lifting The State Up
Time to Practice: Working with Events & State - Problem
Time to Practice: Working with Events & State - Solution
Controlled vs Uncontrolled Components & Stateless vs Stateful Components
Module Introduction
Rendering Lists of Data
Using Stateful Lists
Understanding "Keys"
Time to Practice: Working with Lists - Problem
Time to Practice: Working with Lists - Solution
Outputting Conditional Content
Adding Conditional Return Statements
Time to Practice: Conditional Content - Problem
Time to Practice: Conditional Content - Solution
Demo App: Adding a Chart
Adding Dynamic Styles
Wrap Up & Next Steps
Module Introduction
Setting Dynamic Inline Styles
Setting CSS Classes Dynamically
Introducing Styled Components
Styled Components & Dynamic Props
Styled Components & Media Queries
Using CSS Modules
Dynamic Styles with CSS Modules
Module Introduction
Understanding React Error Messages
Analyzing Code Flow & Warnings
Working with Breakpoints
Using the React DevTools
Module Introduction
Adding a "User" Component
Adding a re-usable "Card" Component
Adding a re-usable "Button" Component
Managing the User Input State
Adding Validation & Resetting Logic
Adding a Users List Component
Managing a List Of Users via State
Adding The "ErrorModal" Component
Managing the Error State
Module Introduction
JSX Limitations & Workarounds
Creating a Wrapper Component
React Fragments
Introducing React Portals
Working with Portals
Working with "ref"s
Controlled vs Uncontrolled Components
Module Introduction
What are "Side Effects" & Introducing useEffect
Using the useEffect() Hook
useEffect & Dependencies
Using the useEffect Cleanup Function
useEffect Summary
Introducing useReducer & Reducers In General
Using the useReducer() Hook
useReducer & useEffect
useReducer vs useState for State Management
Introducing React Context (Context API)
Using the React Context API
Tapping Into Context with the useContext Hook
Making Context Dynamic
Building & Using a Custom Context Provider Component
React Context Limitations
Learning the "Rules of Hooks"
Refactoring an Input Component
Diving into "Forward Refs"
Module Introduction
Starting Setup
Adding a "Header" Component
Adding the "Cart" Button Component
Adding a "Meals" Component
Adding Individual Meal Items & Displaying Them
Adding a Form
Working on the "Shopping Cart" Component
Adding a Modal via a React Portal
Managing Cart & Modal State
Adding a Cart Context
Using the Context
Adding a Cart Reducer
Working with Refs & Forward Refs
Outputting Cart Items
Working on a More Complex Reducer Logic
Making Items Removable
Using the useEffect Hook
Module Introduction
How React Really Works
Component Updates In Action
A Closer Look At Child Component Re-Evaluation
Preventing Unnecessary Re-Evaluations with React.memo()
Preventing Function Re-Creation with useCallback()
useCallback() and its Dependencies
A First Summary
A Closer Look At State & Components
Understanding State Scheduling & Batching
Optimizing with useMemo()
Module Introduction
What & Why
Adding a First Class-based Component
Working with State & Events
The Component Lifecycle (Class-based Components Only!)
Lifecycle Methods In Action
Class-based Components & Context
Class-based vs Functional Components: A Summary
Introducing Error Boundaries
Module Introduction
How To (Not) Connect To A Database
Our Starting App & Backend
Sending a GET Request
Using async / await
Handling Loading & Data States
Handling Http Errors
Using useEffect() For Requests
Preparing The Project For The Next Steps
Sending a POST Request
Wrap Up
Module Introduction
What are "Custom Hooks"?
Creating a Custom React Hook Function
Using Custom Hooks
Configuring Custom Hooks
Onwards To A More Realistic Example
Building a Custom Http Hook
Using the Custom Http Hook
Adjusting the Custom Hook Logic
Using The Custom Hook In More Components
Module Introduction
Our Starting Setup
What's So Complex About Forms?
Dealing With Form Submission & Getting User Input Values
Adding Basic Validation
Providing Validation Feedback
Handling the "was touched" State
React To Lost Focus
Refactoring & Deriving States
Managing The Overall Form Validity
Time to Practice: Forms - Problem
Time to Practice: Forms - Solution
Adding A Custom Input Hook
Re-Using The Custom Hook
A Challenge For You!
Applying Our Hook & Knowledge To A New Form
Summary
Bonus: Using useReducer()
Module Introduction
Moving "Meals" Data To The Backend
Fetching Meals via Http
Handling the Loading State
Handling Errors
Adding A Checkout Form
Reading Form Values (4:51)
Adding Form Validation
Submitting & Sending Cart Data
Adding Better User Feedback
Summary
Module Introduction
Another Look At State In React Apps
Redux vs React Context
How Redux Works
Exploring The Core Redux Concepts
More Redux Basics
Preparing a new Project
Creating a Redux Store for React
Providing the Store
Using Redux Data in React Components
Dispatching Actions From Inside Components
Redux with Class-based Components
Attaching Payloads to Actions
Working with Multiple State Properties
How To Work With Redux State Correctly
Redux Challenges & Introducing Redux Toolkit
Adding State Slices
Connecting Redux Toolkit State
Migrating Everything To Redux Toolkit
Working with Multiple Slices
Reading & Dispatching From A New Slice
Splitting Our Code
Summary
Module Introduction
Redux & Side Effects (and Asynchronous Code)
Refresher / Practice: Part 1/2
Refresher / Practice: Part 2/2
Redux & Async Code
Frontend Code vs Backend Code
Where To Put Our Logic
Using useEffect with Redux
Handling Http States & Feedback with Redux
Using an Action Creator Thunk
Getting Started with Fetching Data
Finalizing the Fetching Logic
Exploring the Redux DevTools
Summary
Module Introduction
Routing: Multiple Pages in Single-Page Applications
Project Setup & Installing React Router
Defining Routes
Adding a Second Route
Exploring an Alternative Way of Defining Routes
Navigating between Pages with Links
Layouts & Nested Routes
Showing Error Pages with errorElement
Working with Navigation Links (NavLink)
Navigating Programmatically
Defining & Using Dynamic Routes
Adding Links for Dynamic Routes
Understanding Relative & Absolute Paths
Working with Index Routes
Onwards to a new Project Setup
Time to Practice: Problem
Time to Practice: Solution
Data Fetching with a loader()
Using Data From A Loader In The Route Component
More loader() Data Usage
Where Should loader() Code Be Stored?
When Are loader() Functions Executed?
Reflecting The Current Navigation State in the UI
Returning Responses in loader()s
Which Kind Of Code Goes Into loader()s?
Error Handling with Custom Errors
Extracting Error Data & Throwing Responses
The json() Utility Function
Dynamic Routes & loader()s
The useRouteLoaderData() Hook & Accessing Data From Other Routes
Planning Data Submission
Working with action() Functions
Submitting Data Programmatically
Updating the UI State Based on the Submission Status
Validating User Input & Outputting Validation Errors
Reusing Actions via Request Methods
Behind-the-Scenes Work with useFetcher()
Deferring Data Fetching with defer()
Controlling Which Data Should Be Deferred
Module Summary
Module Introduction
How Authentication Works
Project Setup & Route Setup
Working with Query Parameters
Implementing the Auth Action
Validating User Input & Outputting Validation Errors
Adding User Login
Attaching Auth Tokens to Outgoing Requests
Adding User Logout
Updating the UI Based on Auth Status
Adding Route Protection
Adding Automatic Logout
Managing the Token Expiratoin
Module Introduction
Deployment Steps
Understanding Lazy Loading
Adding Lazy Loading
Building the Code For Production
Deployment Example
Server-side Routing & Required Configuration
Module Introduction
What is NextJS?
Key Feature 1: Built-in Server-side Rendering (Improved SEO!)
Key Feature 2: Simplified Routing with File-based Routing
Key Feature 3: Build Fullstack Apps
Creating a New Next.js Project & App
Analyzing the Created Project
Adding First Pages
Adding Nested Paths & Pages (Nested Routes)
Creating Dynamic Pages (with Parameters)
Extracting Dynamic Parameter Values
Linking Between Pages
Onwards to a bigger Project!
Preparing the Project Pages
Outputting a List of Meetups
Adding the New Meetup Form
The "_app.js" File & Layout Wrapper
Using Programmatic (Imperative) Navigation
Adding Custom Components & CSS Modules
How Pre-rendering Works & Which Problem We Face
Data Fetching for Static Pages
More on Static Site Generation (SSG)
Exploring Server-side Rendering (SSR) with "getServerSideProps"
Working with Params for SSG Data Fetching
Preparing Paths with "getStaticPaths" & Working With Fallback Pages
Introducing API Routes
Working with MongoDB
Sending Http Requests To Our API Routes
Getting Data From The Database
Getting Meetup Details Data & Preparing Pages
Adding "head" Metadata
Deploying Next.js Projects
Using Fallback Pages & Re-deploying
Summary
Module Introduction
Preparing the Demo Project
Using CSS Transitions
Using CSS Animations
CSS Transition & Animations Limitations
Using ReactTransitionGroup
Using the Transition Component
Wrapping the Transition Component
Animation Timings
Transition Events
The CSSTransition Component
Customizing CSS Classnames
Animating Lists
Alternative Animation Packages
Wrap Up
Module Introduction
Starting Project & Why You Would Replace Redux
Alternative: Using the Context API
Toggling Favorites with the Context API
Context API Summary (and why NOT to use it instead of Redux)
Getting Started with a Custom Hook as a Store
Finishing the Store Hook
Creating a Concrete Store
Using the Custom Store
Custom Hook Store Summary
Optimizing the Custom Hook Store
Wrap Up
Module Introduction
What & Why?
Understanding Different Kinds Of Tests
What To Test & How To Test
Understanding the Technical Setup & Involved Tools
Running a First Test
Writing Our First Test
Grouping Tests Together With Test Suites
Testing User Interaction & State
Testing Connected Components
Testing Asynchronous Code
Working With Mocks
Summary & Further Resources
Module Introduction
What & Why?
Installing & Using TypeScript
Exploring the Base Types
Working with Array & Object Types
Understanding Type Inference
Using Union Types
Understanding Type Aliases
Functions & Function Types
Diving Into Generics
Creating a React + TypeScript Project
Working with Components & TypeScript
Working with Props & TypeScript
Adding a Data Model
Time to Practice: Exercise Time!
Form Submissions In TypeScript Projects
Working with refs & useRef
Working with "Function Props"
Managing State & TypeScript
Adding Styling
Time to Practice: Removing a Todo
The Context API & TypeScript
Summary
Bonus: Exploring tsconfig.json
Module Introduction
What Are React Hooks?
The Starting Project
Getting Started with useState()
More on useState() & State Updating
Array Destructuring
Multiple States
Rules of Hooks
Passing State Data Across Components
Time to Practice: Hooks Basics - Problem
Time to Practice: Hooks Basics - Solution
Sending Http Requests
useEffect() & Loading Data
Understanding useEffect() Dependencies
More on useEffect()
What's useCallback()?
Working with Refs & useRef()
Cleaning Up with useEffect()
Deleting Ingredients
Loading Errors & State Batching
Understanding useReducer()
Using useReducer() for the Http State
Working with useContext()
Performance Optimizations with useMemo()
Getting Started with Custom Hooks
Sharing Data Between Custom Hooks & Components
Using the Custom Hook
Wrap Up
Module Introduction
What Is React & Why Would You Use It?
React Projects - Requirements
Creating React Projects
Out Starting Project
Understanding How React Works
Building A First Custom Component
Outputting Dynamic Values
Reusing Components
Passing Data to Components with Props
CSS Styling & CSS Modules
Exercise & Another Component
Preparing the App For State Management
Adding Event Listeners
Working with State
Lifting State Up
The Special "children" Prop
State & Conditional Content
Adding a Shared Header & More State Management
Adding Form Buttons
Handling Form Submission
Updating State Based On Previous State
Outputting List Data
Adding a Backend to the React SPA
Sending a POST HTTP Request
Handling Side Effects with useEffect()
Handle Loading State
Understanding & Adding Routing
Adding Routes
Working with Layout Routes
Refactoring Route Components & More Nesting
Linking & Navigating
Data Fetching via loader()s
Submitting Data with action()s
Dynamic Routes
Module Summary
What Now? Next Steps You Could Take!
Explore The React Ecosystem!
Finishing Thoughts

You might also like