Reader small image

You're reading from  React 16 Tooling

Product typeBook
Published inApr 2018
Reading LevelBeginner
PublisherPackt
ISBN-139781788835015
Edition1st Edition
Languages
Tools
Right arrow
Authors (2):
Adam Boduch
Adam Boduch
author image
Adam Boduch

Adam Boduch has been involved in large-scale JavaScript development for nearly 15 years. Before moving to the frontend, he worked on several large-scale cloud computing products using Python and Linux. No stranger to complexity, Adam has practical experience with real-world software systems and the scaling challenges they pose.
Read more about Adam Boduch

Christopher Pitt
Christopher Pitt
author image
Christopher Pitt

Christopher Pitt is a principal developer for SilverStripe in Wellington, New Zealand. He usually works on open source software, though sometimes you'll find him building compilers and robots.
Read more about Christopher Pitt

View More author details
Right arrow

Summary


In this chapter, you learned about why type-checking your React code matters. You also learned about Flow—the tool used to type-check React code. Type-checking is important for React applications because it removes the need to perform runtime checks of values in the majority of cases. This is because Flow is able to statically follow code paths and determine whether everything is being used as intended.

Then, you installed Flow locally to a React application and learned how to run it. Next, you learned the basics of validating property and state values of React components. Then you learned how to validate function types and how to enforce child React component types.

Flow can be used in create-react-app dev server, but you have to eject first. In future versions of create-react-app, there will likely be better integrated support for running Flow as part of the dev server. Another option is to install a Flow plugin in a code editor such as Atom, and have errors displayed right in front...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
React 16 Tooling
Published in: Apr 2018Publisher: PacktISBN-13: 9781788835015

Authors (2)

author image
Adam Boduch

Adam Boduch has been involved in large-scale JavaScript development for nearly 15 years. Before moving to the frontend, he worked on several large-scale cloud computing products using Python and Linux. No stranger to complexity, Adam has practical experience with real-world software systems and the scaling challenges they pose.
Read more about Adam Boduch

author image
Christopher Pitt

Christopher Pitt is a principal developer for SilverStripe in Wellington, New Zealand. He usually works on open source software, though sometimes you'll find him building compilers and robots.
Read more about Christopher Pitt