Quick Overview why TypeScript or Flow is Awesome

Peter Kowalczyk
Aurity.co
Published in
2 min readApr 10, 2018

--

Every time we consult the architecture for JS applications and prepare the groundwork that scales clients’ application faster we run into a question:

“Should we use TypeScript or Flow and what are the benefits?”

Here is a quick explanation and GIF examples, which are worth more than 1000 words:

1. Documentation

TypeScript is like Swagger, and it documents code by giving us a description of objects, structures, and possible usage.

Documentation in your code

2. Faster Development

Very often while compiling the code, the editor will throw out an error about possible issues. Therefore you will avoid console.log statement.

Autocompletion, automatic imports and much more! Yes it’s better than for standard JS :)

3. Refactoring

Blazing fast and easy to refactor your code, just change the interface and fix all the errors. Refresh the app, and it works! No console logs!

Forget about undefined: Change, Fix, Deploy!

4. Guidance on how to use methods — my favorite!

Auto-completion and Type-Checking can guide you about usage for components. If you click RN element (e.g., TouchableHighlight), it shows the attributes of this element. It has the support of many code editors.

Remarks: These examples are based on TypeScript, which in our opinion is more strict and has better support for developers

There is much more, and I could talk about it even more. If you have some questions, leave a comment below. Tell me what are your favorites and if still, you are wondering you should use Types check this short article “Do I need TypeScript or Flow?”

--

--

Using technology to create better, faster products. #React #ReactNative #GraphQL #TypeScript #DigitalNomad at Aurity.co