Book Image

React 16 Tooling

By : Adam Boduch, Christopher Pitt
Book Image

React 16 Tooling

By: Adam Boduch, Christopher Pitt

Overview of this book

React 16 Tooling covers the most important tools, utilities, and libraries that every React developer needs to know — in detail. As React has grown, the amazing toolset around it has also grown, adding features and enhancing the development workflow. Each of these essential tools is presented in a practical manner and in a logical order mirroring the development workflow. These tools will make your development life simpler and happier, enabling you to create better and more performant apps. Adam starts with a hand-picked selection of the best tools for the React 16 ecosystem. For starters, there’s the create-react-app utility that’s officially supported by the React team. Not only does this tool bootstrap your React project for you, it also provides a consistent and stable framework to build upon. The premise is that when you don’t have to think about meta development work, more focus goes into the product itself. Other React tools follow this same approach to automating and improving your development life. Jest makes unit testing quicker. Flow makes catching errors easier. Docker containers make deployment in a stack simpler. Storybook makes developing components straightforward. ESLint makes writing standardized code faster. The React DevTools plugin makes debugging a cinch. React 16 Tooling clears away the barriers so you can focus on developing the good parts. In this book, we’ll look at each of these powerful tools in detail, showing you how to build the perfect React ecosystem to develop your apps within.
Table of Contents (18 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
2
Efficiently Bootstrapping React Applications with Create React App
Index

Time travel debugging


One requirement of reducer functions in Redux is that they're pure; that is, they only return new data as opposed to mutating existing data. One consequence of this is that it enables time travel debugging. Because nothing ever changes, you can move the state of your application forward, backward, or to an arbitrary point in time. The Redux DevTools make this easy to do.

To see time travel debugging in action, let's type some filter text into the filter input box:

Looking at the actions in Redux DevTools, you should see something along these lines:

I've selected the last SET_FILTER_VALUE action that was dispatched. The filterValue value should be native b, which reflects the titles that are currently displayed. Now, let's travel back to two actions ago. To do this, move your mouse pointer over the action that's two positions behind the currently selected action. Click on the Jump button, and the state of the application will be changed to the state when this SET_FILTER_VALUE...