From the course: React: Testing and Debugging

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Type checking with flow

Type checking with flow - React.js Tutorial

From the course: React: Testing and Debugging

Start my 1-month free trial

Type checking with flow

- [Narrator] Type checking gives us another tool to prevent bugs and find errors in our code. So, if you're not familiar with type checking, it allows us to define what type of values or variables, objects, and functions should accept. This prevents a lot of unexpected behaviors in our code where we'll be able to see why some of our code doesn't react to way it should, so, let's go ahead and install flow. So, I'm going to go back into VS code. And once I'm back into VS code, I'm going to open a terminal. You want to make sure you're in the root directory of the project. So, let's click on terminal, new terminal. And then the first thing we're going to do is install flow bin. So, let's do npm i, or short for install, flow-bin, and then save this as a dev dependency. So, let's do --save-dev like so. Once this is done, let's minimize our terminal for a second because we're going to go back to it. And then let's open the…

Contents