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

Summary


In this chapter, you learned how to start the development server for a project created with create-react-app. You then learned that the react-scripts package has its own Webpack configuration that it uses when it starts the development server for you. We went over the key areas of configuration that you shouldn't necessarily have to think about when you're trying to write an application.

Finally, you saw hot module reloading in action. Out of the box, react-scripts reloads the app for you when you make source changes. This results in a page refresh, which is good enough to get started. We then looked at the potential challenges of developing components using this approach because it wipes out any state that the component had before it was updated. So you ejected from create-react-app and customized the Webpack configuration for your project to support hot component reloading that will preserve the state.

In the following chapter, you'll work with tooling to support unit tests in your...