Book Image

Redux Made Easy with Rematch

By : Sergio Moreno
Book Image

Redux Made Easy with Rematch

By: Sergio Moreno

Overview of this book

Rematch is Redux best practices without the boilerplate. This book is an easy-to-read guide for anyone who wants to get started with Redux, and for those who are already using it and want to improve their codebase. Complete with hands-on tutorials, projects, and self-assessment questions, this easy-to-follow guide will take you from the simplest through to the most complex layers of Rematch. You’ll learn how to migrate from Redux, and write plugins to set up a fully tested store by integrating it with vanilla JavaScript, React, and React Native. You'll then build a real-world application from scratch with the power of Rematch and its plugins. As you advance, you’ll see how plugins extend Rematch functionalities, understanding how they work and help to create a maintainable project. Finally, you'll analyze the future of Rematch and how the frontend ecosystem is becoming easier to use and maintain with alternatives to Redux. By the end of this book, you'll be able to have total control of the application state and use Rematch to manage its scalability with simplicity.
Table of Contents (18 chapters)
1
Section 1: Rematch Essentials
6
Section 2: Building Real-World Web Apps with Rematch
11
Section 3: Diving Deeper into Rematch

What this book covers

Chapter 1, Why Redux? An Introduction to Redux Architecture, analyzes in depth what design limitations Redux was designed to fix and how it evolved to be the framework that it is today.

Chapter 2, Why Rematch over Redux? An Introduction to Rematch Architecture, briefly explores Rematch's most basic concepts to get started and why and how it was created.

Chapter 3, Redux First Steps – Creating a Simple To-Do App, looks at creating a simple to-do tasks website using Vanilla JavaScript and Redux.

Chapter 4, From Redux to Rematch – Migrating a To-Do App to Rematch, covers migrating the previous to-do tasks website to Rematch, looking at the biggest differences.

Chapter 5, React with Rematch – The Best Couple – Part I, demonstrates, step by step, how to create a shopping store with the latest React technologies, such as Hooks, and using the most modern frameworks, such as Tailwind CSS, and bundling it with Vite.

Chapter 6, React with Rematch – The Best Couple – Part II, looks at how to introduce business logic with Rematch and binding this logic into reusable React components.

Chapter 7, Introducing Testing to Rematch, explains how to set up a real testing suite step by step, testing the business logic and the user interface with the latest frameworks, such as Jest and React Testing Library.

Chapter 8, The Rematch Plugins Ecosystem, explores how Rematch Plugins easily extend Rematch functionality through the official API, analyzing in depth how they work internally and explaining the most important concepts.

Chapter 9, Composable Plugins – Create Your First Plugin, runs through creating a Rematch plugin ready to be published and used by everyone on the ground.

Chapter 10, Rewrite a Full Code Base from JavaScript to TypeScript, goes through migrating our shopping store website to TypeScript, focusing a lot on which types Rematch exports and how these utility types can warn us about possible bugs in our business logic.

Chapter 11, Rematch with React Native and Expo – A Real-World Mobile App, goes through setting up a monorepo architecture from scratch, where we'll learn how Rematch makes it extremely easy to share business logic with the entire organization and how this logic can be reused in other frameworks like React Native.

Chapter 12, Rematch Performance Improvements and Best Practices, analyzes which optimizations can be done to our shopping store website and we'll learn how we can measure our website performance before applying any optimization.

Chapter 13, Conclusion, discusses the future of Rematch and how the frontend ecosystem, and especially state management solutions, have become more user-friendly lately, and what alternatives to Rematch exist today.