浅谈redux2

浅谈redux2

Debugging Redux Applications

Installing Redux DevTools

The Basics

Inspector Monitor

Tracing

Exporting and Importing

Writing Clean Redux Code

Structuring Files and Folders

Ducks Pattern

Redux Toolkit

Creating the Store

Creating Actions

Creating Reducers

Creating Slices

Exercise

Solution

Designing the Store

Redux State vs Local State

Structuring a Redux Store

Combining Reducers

Normalization

Selectors

Memoizing Selectors with Reselect

Exercise

Solution

Middleware

What is Middleware

Creating Middleware

Parameterizing Middleware

Dispatching Functions

Exercise

Solution

A Quick Note

Consuming APIs

Setting Up the Backend

The Approach

API Middleware

Actions

Restructuring the Store

Getting Data from the Server

Loading Indicators

Caching

Saving Data to the Server

Exercise

Solution- Resolving Bugs

Solution- Assigning a Bug to a User

Reducing Coupling

Cohesion

Testing Redux Applications

Introduction

What is Automated Testing

Setting Up the Testing Environment

Your First Unit Test

Unit Testing Redux Applications

Solitary Tests

Social Tests

Mocking HTTP Calls

Writing Clean Tests

Test Coverage

Exercises

Solution- getUnresolvedBugs

Solution- resolveBug

Solution- loadingBugs

A Quick Note

-------------本文结束,感谢您的阅读-------------