Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Redux

You're reading from   Learning Redux Write maintainable, consistent, and easy-to-test web applications

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781786462398
Length 374 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Daniel Bugl Daniel Bugl
Author Profile Icon Daniel Bugl
Daniel Bugl
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Why Redux? FREE CHAPTER 2. Implementing the Elements of Redux 3. Combining Redux with React 4. Combining Redux with Angular 5. Debugging a Redux Application 6. Interfacing with APIs 7. User Authentication 8. Testing 9. Routing 10. Rendering on the Server 11. Solving Generic Problems with Higher-Order Functions 12. Extending the Redux Store via Middleware

Solving generic problems with Redux

You may noticed that as your application grows, there will be common patterns in your application logic. For example, you may be doing the same kind of work for different kinds of data. With the techniques you have learned in this chapter, you can reduce code duplication by reusing the common logic by putting it into a higher-order function.

There are multiple ways to extend a Redux/React application:

  • Higher-order reducers (such as redux-undo)
  • Higher-order action creators (such as generic data fetching from an API)
  • Higher-order components (such as <Provider>)
  • Middleware (such as redux-logger)

The last concept, middleware, extends the Redux store directly, and will be discussed in the next chapter (Chapter 12, Extending the Redux Store using Middleware). The other concepts all use higher-order functions to extend Redux/React concepts...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image