Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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
Redux Made Easy with Rematch

You're reading from   Redux Made Easy with Rematch Reduce Redux boilerplate and apply best practices with Rematch

Arrow left icon
Product type Paperback
Published in Aug 2021
Publisher Packt
ISBN-13 9781801076210
Length 286 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sergio Moreno Sergio Moreno
Author Profile Icon Sergio Moreno
Sergio Moreno
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Rematch Essentials
2. Chapter 1: Why Redux? An Introduction to Redux Architecture FREE CHAPTER 3. Chapter 2: Why Rematch over Redux? An Introduction to Rematch Architecture 4. Chapter 3: Redux First Steps – Creating a Simple To-Do App 5. Chapter 4: From Redux to Rematch – Migrating a To-Do App to Rematch 6. Section 2: Building Real-World Web Apps with Rematch
7. Chapter 5: React with Rematch – The Best Couple – Part I 8. Chapter 6: React with Rematch – The Best Couple – Part II 9. Chapter 7: Introducing Testing to Rematch 10. Chapter 8: The Rematch Plugins Ecosystem 11. Section 3: Diving Deeper into Rematch
12. Chapter 9: Composable Plugins – Create Your First Plugin 13. Chapter 10: Rewrite a Full Code Base from JavaScript to TypeScript 14. Chapter 11: Rematch with React Native and Expo – A Real-World Mobile App 15. Chapter 12: Rematch Performance Improvements and Best Practices 16. Chapter 13: Conclusion 17. Other Books You May Enjoy

The Rematch loading plugin

The official loading plugin for Rematch adds automated loading indicators for effects. This plugin means that we don't have to worry about managing states such as loading: true and loading: false by ourselves.

Installing and configuration

To install this plugin, as it is published like the @rematch/core package, you can just use yarn:

yarn add @rematch/loading

This plugin adds just 596 bytes to our application.

The loading plugin accepts one optional argument, which is an object with the following properties:

  • name: Since this plugin will create a new model for handling all the states of loading our effects, we can overwrite the name of this model. By default, it will be called loading.
  • type: By default, this plugin keeps track of running effects using Booleans, loading: true and loading: false, but you can change that behavior and use numbers or even detailed statuses, like "error" or "success". If you use...
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