Flow is a type-checking tool that allows you to push your code compliance even further. In this video, Emmanuel Henri demonstrates how to use Flow to do type checking. He first runs Flow to check for any errors, then add the proper type declarations to prevents further errors.
- [Instructor] Another great tool to help prevent bugs … is type checking. … Type checking is basically a practice … of declaring what type of data you should expect … to be passed within your application. … If the types don't match, … type checking throws an error … warning that you are trying to pass a number … to a variable that is expecting a string for example. … React has prop types that you can use … within its libraries … but I personally prefer to use a tool like Flow … which has much more to offer … and is also maintained by the Facebook team. … What's really good about Flow is that you could use it … without setting up your types … because Flow offers a lot for you out of the box. … So let's take a look at it. … So I don't know if you remember earlier … when we set up Flow we did a flow here. … So we did this mention. … So flow is going to check for this file. … But I want to do it on a new file. … So I'm going to go to single.js which is in the listings … inside of components. …
- Setting up for React testing and debugging
- Testing with Jest
- Snapshot testing
- Debugging with Chrome and Chrome extensions
- Optimizing React code with ESLINT
- Type checking