ENGLISH

Redux made easy with Rematch: Reduce Redux boilerplate and apply best practices with Rematch

Book information

Publisher
Packt Publishing - ebooks Account
Year
2021
ISBN
1801076219, 9781801076210
Language
english
Format
PDF
Filesize
5 MB (5227835 bytes)
Pages
237\287
Time added
2021-08-30 07:31:05

Description

Discover the power of Rematch and its plugins by building a real-world application from scratch Key FeaturesUnderstand the capabilities of Rematch quickly as you build applicationsLearn to use Rematch and its plugins to simplify everyday tasksTake total control of the application state and manage its scalability using RematchBook Description Rematch is Redux best practices without the boilerplate. This easy-to-follow guide is for anyone who wants to start using Redux and for existing Redux users looking to improve their codebase. Complete with hands-on tutorials, projects, and self-assessment questions, this book will quickly take you through basic to advanced Rematch features. You’ll learn how to migrate from Redux, write plugins, set up a fully tested store, and integrate with vanilla JavaScript and frameworks such as NextJS and Gatsby. The book will show you how to build a real-world application from scratch with the power of Rematch and its plugins, helping you understand how plugins extend Rematch functionalities. Once you discover how plugins work, you'll see how to leverage them to create maintainable projects. Finally, you'll analyze the future of Rematch and understand how the frontend ecosystem is progressing to become more practical and maintainable with alternatives to Redux. By the end of this book, you'll have total control of the application state and be able to manage its scalability with simplicity using Rematch. What you will learnUnderstand the principal concepts of Flux and ReduxFind out what are the main problems that Rematch solvesBecome familiar with the Rematch ecosystemDevelop an application using Rematch and React togetherWrite unit and integration tests to get 100% test coverage of your programs with RematchCreate a React Native App with Rematch and ExpoPersist data with redux-persist and RematchBuild a Rematch plugin from scratchWho This Book Is For This book is for React and Redux users looking for better alternatives for Redux. Familiarity with JavaScript, React, and Redux will help you make the most of this book. Cover Copyright Contributors Table of Contents Preface Section 1: Rematch Essentials Chapter 1: Why Redux? An Introduction to Redux Architecture Technical requirements Why Redux? What was there before Redux? Flux Actions Flux Dispatcher Flux Stores Views How does Redux work? Reducers Stores Summary Chapter 2: Why Rematch over Redux? An Introduction to Rematch Architecture Technical requirements Why Rematch? Setting up a store Reducers Async/await over Redux Thunk Reducers and effects Folder structure How does Rematch work? Name State Reducers Effects Summary Chapter 3: Redux First Steps – Creating a Simple To-Do App Technical requirements Preparing the environment Creating our first store Creating our first reducer Adding a task Removing a to-do task Toggling tasks to show as completed Clearing completed tasks Dispatching actions Summary Chapter 4: From Redux to Rematch – Migrating a To-Do App to Rematch Technical requirements Introducing the Rematch library Migrating a Redux store to Rematch init Migrating Redux reducers to Rematch reducers Migrating dispatch actions to effects Adding a task Removing a task and toggle completed Clear completed Summary Section 2: Building Real-World Web Apps with Rematch Chapter 5: React with Rematch – The Best Couple – Part I Technical requirements Preparing the environment Creating the user interface components Header Product List List component Summary Chapter 6: React with Rematch – The Best Couple – Part II Technical requirements Creating the shop business logic getProducts() Adding products to the cart Removing products from the cart Restoring the cart to its initial state Binding components with business logic Connecting the product list Loading more items on scroll Connecting our application to the Cart logic Restoring the cart to an empty state Introducing the search feature Adding to favorites Summary Chapter 7: Introducing Testing to Rematch Technical requirements Introduction to JavaScript testing Types of tests Test frameworks Mocking in tests Coverage Preparing the environment Configuring Jest Configuring MSW Creating tests for Rematch models Creating tests for React components Summary Chapter 8: The Rematch Plugins Ecosystem Technical requirements Introduction to Rematch plugins config exposed createMiddleware onReducer onRootReducer onModel onStoreCreated The Rematch loading plugin Installing and configuration Example usage The Rematch select plugin Installing and configuration Example usage The Rematch Immer plugin Installation and configuration Example usage The Rematch updated plugin Installation and configuration The Rematch persist plugin Installation and configuration Summary Section 3: Diving Deeper into Rematch Chapter 9: Composable Plugins – Create Your First Plugin Technical requirements Preparing the environment Creating our plugin onModel createMiddleware Testing our plugin Publishing to NPM Summary Chapter 10: Rewrite a Full Code Base from JavaScript to TypeScript Technical requirements Introduction to TypeScript Generics Rematch utility types RootModel init() createModel RematchRootState RematchDispatch Converting Rematch models to TypeScript Creating the configuration file Renaming our files Installing declaration files Creating the RootModel interface Using createModel in a Rematch model Making payloads fully typed TypeScript with React and Rematch Summary Chapter 11: Rematch with React Native and Expo – A Real-World Mobile App Technical requirements Introduction to workspaces Setting up our workspace Creating the workspace Creating distributable business logic Using the business logic in our Amazhop website Creating a React Native application with Expo Integrating the Amazhop logic Summary Chapter 12: Rematch Performance Improvements and Best Practices Technical requirements Before optimizing, measure Google Chrome DevTools The React DevTools extension Google Chrome Lighthouse Debouncing and throttling Virtualizing large lists React optimizations useMemo useCallback Redux selectors with shallow comparison Using the @rematch/select package The shallowEqual function Redux batching Data normalization Summary Chapter 13: Conclusion Wrapping up Rematch essentials Building real-world websites with Rematch Diving deeper into Rematch The future of Rematch The future of Redux Curtains down Other Books You May Enjoy Index

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF