توضیحاتی در مورد کتاب React Key Concepts. Consolidate your knowledge of React’s core features
نام کتاب : React Key Concepts. Consolidate your knowledge of React’s core features
عنوان ترجمه شده به فارسی : مفاهیم کلیدی React دانش خود را در مورد ویژگی های اصلی React تثبیت کنید
سری :
نویسندگان : M. Schwarzmuller
ناشر :
سال نشر : 2022
تعداد صفحات : 591
ISBN (شابک) : 9781803234502
زبان کتاب : English
فرمت کتاب : pdf
حجم کتاب : 5 Mb
بعد از تکمیل فرایند پرداخت لینک دانلود کتاب ارائه خواهد شد. درصورت ثبت نام و ورود به حساب کاربری خود قادر خواهید بود لیست کتاب های خریداری شده را مشاهده فرمایید.
فهرست مطالب :
Cover
FM
Copyright
Table of Contents
Preface
Chapter 1: React – What and Why
Introduction
What Is React?
The Problem with "Vanilla JavaScript"
React and Declarative Code
How React Manipulates the DOM
Introducing Single Page Applications
Creating a React Project
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Chapter 2: Understanding React Components and JSX
Introduction
What Are Components?
Why Components?
The Anatomy of a Component
What Exactly Are Component Functions?
What Does React Do with All These Components?
Built-in Components
Naming Conventions
JSX vs HTML vs Vanilla JavaScript
Using React without JSX
JSX Elements Are Treated like Regular JavaScript Values!
JSX Elements Must Be Self-Closing
Outputting Dynamic Content
When Should You Split Components?
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 2.1: Creating a React App to Present Yourself
Activity 2.2: Creating a React App to Log Your Goals for This Book
Chapter 3: Components and Props
Introduction
Not There Yet
Using Props in Components
Passing Props to Components
Consuming Props in a Component
Components, Props, and Reusability
The Special "children" Prop
Which Components Need Props?
How to Deal with Multiple Props
Spreading Props
Prop Chains / Prop Drilling
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 3.1: Creating an App to Output Your Goals for This Book
Chapter 4: Working with Events and State
Introduction
What's the Problem?
How Not to Solve the Problem
A Better Incorrect Solution
Properly Reacting to Events
Updating State Correctly
A Closer Look at useState()
A Look under the Hood of React
Naming Conventions
Allowed State Value Types
Working with Multiple State Values
Using Multiple State Slices
Managing Combined State Objects
Updating State Based on Previous State Correctly
Two-Way Binding
Deriving Values from State
Working with Forms and Form Submission
Lifting State Up
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 4.1: Building a Simple Calculator
Activity 4.2: Enhancing the Calculator
Chapter 5: Rendering Lists and Conditional Content
Introduction
What Are Conditional Content and List Data?
Rendering Content Conditionally
Different Ways of Rendering Content Conditionally
Utilizing Ternary Expressions
Abusing JavaScript Logical Operators
Get Creative!
Which Approach Is Best?
Setting Element Tags Conditionally
Outputting List Data
Mapping List Data
Updating Lists
A Problem with List Items
Keys to the Rescue!
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 5.1: Showing a Conditional Error Message
Activity 5.2: Outputting a List of Products
Chapter 6: Styling React Apps
Introduction
How Does Styling Work in React Apps?
Using Inline Styles
Setting Styles via CSS Classes
Setting Styles Dynamically
Conditional Styles
Combining Multiple Dynamic CSS Classes
Merging Multiple Inline Style Objects
Building Components with Customizable Styles
Customization with Fixed Configuration Options
The Problem with Unscoped Styles
Scoped Styles with CSS Modules
The styled-components Library
Using Other CSS or JavaScript Styling Libraries and Frameworks
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 6.1: Providing Input Validity Feedback upon Form Submission
Activity 6.2: Using CSS Modules for Style Scoping
Chapter 7: Portals and Refs
Introduction
A World without Refs
Refs versus State
Using Refs for More than DOM Access
Forwarding Refs
Controlled versus Uncontrolled Components
React and Where Things End up in the DOM
Portals to the Rescue
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Have Learned
Activity 7.1: Extract User Input Values
Activity 7.2: Add a Side-Drawer
Chapter 8: Handling Side Effects
Introduction
What's the Problem?
Understanding Side Effects
Side Effects Are Not Just about HTTP Requests
Dealing with Side Effects with the useEffect() Hook
How to Use useEffect()
Effects and Their Dependencies
Unnecessary Dependencies
Cleaning Up after Effects
Dealing with Multiple Effects
Functions as Dependencies
Avoiding Unnecessary Effect Executions
Effects and Asynchronous Code
Rules of Hooks
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 8.1: Building a Basic Blog
Chapter 9: Behind the Scenes of React and Optimization Opportunities
Introduction
Revisiting Component Evaluations and Updates
What Happens When a Component Function Is Called
The Virtual DOM vs the Real DOM
State Batching
Avoiding Unnecessary Child Component Evaluations
Avoiding Costly Computations
Utilizing useCallback()
Avoiding Unnecessary Code Download
Reducing Bundle Sizes via Code Splitting (Lazy Loading)
Strict Mode
Debugging Code and the React Developer Tools
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 9.1: Optimize an Existing App
Chapter 10: Working with Complex State
Introduction
A Problem with Cross-Component State
Using Context to Handle Multi-Component State
Providing and Managing Context Values
Using Context in Nested Components
Changing Context from Nested Components
Getting Better Code Completion
Context or "Lifting State Up"?
Outsourcing Context Logic into Separate Components
Combining Multiple Contexts
Limitations of useState()
Managing State with useReducer()
Understanding Reducer Functions
Dispatching Actions
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 10.1: Migrating an App to the Context API
Activity 10.2: Replacing useState() with useReducer()
Chapter 11: Building Custom React Hooks
Introduction
Why Would You Build Custom Hooks?
What Are Custom Hooks?
A First Custom Hook
Custom Hooks: A Flexible Feature
Custom Hooks and Parameters
Custom Hooks and Return Values
A More Complex Example
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 11.1: Build a Custom Keyboard Input Hook
Chapter 12: Multipage Apps with React Router
Introduction
One Page Is Not Enough
Getting Started with React Router and Defining Routes
Adding Page Navigation
From Link to NavLink
Route Components versus "Normal" Components
From Static to Dynamic Routes
Extracting Route Parameters
Creating Dynamic Links
Navigating Programmatically
Redirecting
Nested Routes
Handling Undefined Routes
Lazy Loading
Summary and Key Takeaways
What's Next?
Test Your Knowledge!
Apply What You Learned
Activity 12.1: Creating a Basic Three-Page Website
Activity 12.2: Enhancing the Basic Website
Chapter 13: Managing Data with React Router
Introduction
Data Fetching and Routing Are Tightly Coupled
Sending HTTP Requests without React Router
Loading Data with React Router
Enabling These Extra Router Features
Loading Data for Dynamic Routes
Loaders, Requests, and Client-Side Code
Layouts Revisited
Reusing Data across Routes
Handling Errors
Onward to Data Submission
Working with action() and Form Data
Returning Data Instead of Redirecting
Controlling Which