Old Habits Die Hard, But Getting New Ones is Essential. Tips on Getting the Most Out of TypeScript

In web development, no one is surprised when a new framework or library enters the stage. Implementing complex functionalities and creating UI elements from scratch only using the powers of a specific programming language is not always the most optimal way. Instead, developers either rely on the existing frameworks or create their own for internal use. In the case of programming languages, the situation is a little more complicated.

A fairly large number of coders are unhappy with the limitations of the programming language that they use every day. Therefore, from time to time, we can hear about the new programming language release. The question is, will the development community adopt it as a replacement for well-established technologies? As an example, we can take a look at Dart. It was initially released in 2011 but remained quite unpopular until the Flutter framework was launched in 2017.

Creating Custom Types in TypeScript

JavaScript is a weakly typed language, which means we don't usually think about types. Typescript is strongly typed, which means everything has a type.

Occasionally we want to make an object or the return of a function conform to a certain format. This is where we use custom types. Typescript allows us to define our own custom types, which we can then use in our code.

Basics of React and TypeScript

In web development, there are plenty of options regarding the programming language, library, and/or framework you want to use. Choosing one over another will, of course, have its positive and negative aspects.

I am pretty familiar with ReactJS, this being the framework for front-end development where I am currently working. To give you a bit of context, we’re developing a flipbook-making tool used by millions of people worldwide. The pressure is high to deliver the best bug-free code.