Foreword

Since its release in mid-2015, Redux has captured the attention of the JavaScript world. From its humble beginnings as a proof-of-concept for a conference demo and label as “just another Flux implementation,” it’s grown to become the most widely used state management solution for React applications. It’s also been adopted for use by the Angular, Ember, and Vue communities and inspired dozens of imitations and spinoffs.

One of my favorite quotes is, “Redux is a generic framework that provides a balance of just enough structure and just enough flexibility. As such, it provides a platform for developers to build customized state management for their use-cases, while being able to reuse things like the graphical debugger or middleware.”[1] Indeed, while Redux supplies a basic set of tools to work with and outlines a general pattern to follow for organizing your app’s update logic, it’s ultimately up to you to decide how to build your app around Redux. You lay out your app’s file structures, write the reducer logic, connect the components, and determine how much abstraction you want to use on top of Redux.

1

The learning curve for Redux can be steep at times. Functional programming and immutability are unfamiliar concepts to most developers coming from object-oriented languages. Writing yet another TodoMVC example doesn’t really showcase the benefits of Redux, or how to tackle building a “real” application. But the end benefits are worth it. The ability to clearly trace data flow in your application and understand where/when/why/how a particular piece of state changed is incredibly valuable, and good Redux usage ultimately leads to code that’s more maintainable and predictable for the long term.

I’ve spent most of my time as a Redux maintainer helping people learn Redux by answering questions, improving the docs, and writing tutorial blog posts. In the process, I’ve seen hundreds of different Redux tutorials. With that in mind, I’m extremely happy to recommend Redux in Action as one of the best resources to learn Redux.

With Redux in Action, Marc Garreau and Will Faurot have written the Redux book I wish I’d written myself. It’s comprehensive, it’s practical, and it does a great job of teaching many key topics for real-world Redux apps. I especially appreciate the way this book covers areas that don’t always have a single clear-cut answer, such as structuring a project, by laying out the pros and cons and letting the reader know this is an area where they may have to decide for themselves.

In today’s fast-moving programming world, no one book can completely capture everything there is to know about a tool. But, Redux in Action will give you a solid foundation and understanding of the fundamentals of Redux, how the pieces fit together, how to use that knowledge for real-world apps, and where to look for more information. I’m excited to see this book released and look forward to having you join the Redux community!

MARK ERIKSON
Redux co-maintainer

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.63.106