ELI5: Movement – Static Kind Checker for JavaScript

This article was written in collaboration with Joe Previte, an open source developer advocate on Facebook.

In this post we explain Flow, a static type check for JavaScript, in a way that is very easy to understand (or as it is commonly known online, ELI5). If you’d like to learn by watching or listening, check out a video about this open source project on our Facebook Open Source YouTube channel.

Why flow

When you write code for a program, you want to make sure that you catch errors before your users do. Unfortunately, JavaScript alone does not protect you from making and exposing these mistakes. JavaScript is designed to make it easy for developers to write code quickly. Type safety must be managed manually.

At Facebook, we wanted to help our developers stay productive and send out quality code quickly. So we created Flow, a static type check for JavaScript. Through intelligent program analysis, Flow checks your program in the background while you focus on writing quality code and reporting errors back to you. It extracts information from your program to find out exactly what you are doing. If it doesn’t understand, tell you. Then, comment on your code to explain your intentions to other developers and Flow.

Flow provides real-time feedback right in your editor and allows you to write JavaScript the way you want. It integrates seamlessly with many tools, making it easy to add to your existing workflow. As a result, you send fewer errors into production and work more productively and efficiently as a developer.

Where is it used?

Flow was made available as an open source version in November 2014. Currently on Facebook, it’s used throughout our code base wherever we write JavaScript.

Where can i learn more?

To learn more about Flow, visit the website. It has excellent documentation for developers who are just starting out and developers who want to use more advanced features. If you want to see Flow in action, you can try it out online at the Flow playground. If you have any questions, you can head over to Flow’s Discord, Twitter, or StackOverflow.

If you’d like to see more content about Flow, let us know on our YouTube channel or by tweeting.

About the ELI5 series

In a series of short videos (about 1 minute long), one of our developer attorneys on the Facebook Open Source team explains a Facebook Open Source project in a way that is easy to understand and use.

For each of these videos we are writing an accompanying blog post (like the one you are reading right now) which you can find on our YouTube channel.

To learn more about Facebook Open Source, visit our Open Source website, subscribe to our YouTube channel, or follow us on Twitter and Facebook.

Would you like to work with open source on Facebook? Check out our open source related job postings on our careers page by taking this quick survey.

Comments are closed.