TypeScript

How to Migrate a React App to TypeScript — SitePoint – Website Design Article

When I first started learning TypeScript, one of the suggestions I often heard was, “convert one of your existing projects! It’s the best way to learn!” Soon after, a friend from Twitter offered to do just that — show me how to migrate a React app to TypeScript. The purpose of this article is to be that friend for you and help you migrate your own project to TypeScript. For context, I will be using pieces from a personal project…

Read More

Angular Image Gallery With Bootstrap – Website Design Article

Recently I was presented with a challenge to quickly build an image gallery. The key requirements for the exercise were to use Angular 8 and Bootstrap 4. In this article, I have explained how we can achieve this with minimum time, effort, and resources. Since this is a practical use case in many applications, I hope it will help developers trying to build a similar feature.  Note that for this tutorial, I have used Visual Studio Code on a Windows…

Read More

Practical Ways to Advance Your TypeScript Skills — SitePoint – Website Design Article

As a programmer, it can feel like you know something well enough to be dangerous. For some situations, this is fine. All you need to know are these three methods in this programming language. Other times we want to develop expertise. In this article, we’ll cover ways to advance your TypeScript skills to that next level. Below are various ways you can further your TypeScript abilities. These are in no particular order. Learn in Public One of my favorite movements…

Read More

React with TypeScript: Best Practices — SitePoint – Website Design Article

React and TypeScript are two awesome technologies used by a lot of developers these days. Knowing how to do things can get tricky, and sometimes it’s hard to find the right answer. Not to worry. We’ve put together the best practices along with examples to clarify any doubts you may have. Let’s dive in! How React and TypeScript Work Together Before we begin, let’s revisit how React and TypeScript work together. React is a “JavaScript library for building user interfaces”,…

Read More

Compile-time Immutability in TypeScript — SitePoint – Website Design Article

TypeScript allows us to decorate specification-compliant ECMAScript with type information that we can analyze and output as plain JavaScript using a dedicated compiler. In large-scale projects, this sort of static analysis can catch potential bugs ahead of resorting to lengthy debugging sessions, let alone deploying to production. However, reference types in TypeScript are still mutable, which can lead to unintended side effects in our software. In this article, we’ll look at possible constructs where prohibiting references from being mutated can…

Read More

How TypeScript Makes You a Better JavaScript Developer — SitePoint – Website Design Article

What do Airbnb, Google, Lyft and Asana have in common? They’ve all migrated several codebases to TypeScript. Whether it is eating healthier, exercising, or sleeping more, our humans love self-improvement. The same applies to our careers. If someone shared tips for improving as a programmer, your ears would perk. In this article, the goal is to be that someone. We know TypeScript will make you a better JavaScript developer for several reasons. You’ll feel confident when writing code. Fewer errors…

Read More

Get Started Writing Class-based Vue.js Apps in TypeScript — SitePoint – Website Design Article

In September of last year, Evan You (creator of Vue.js) announced plans for the next major version of the library. Vue 3.0 will feature an improved experience for TypeScript users, including native support for class-based components, and better support for type inference when writing code. The great news is, you don’t have to wait until version 3.0 is released (predicted for Q3 of 2019) to start writing your Vue apps in TypeScript. Vue’s command-line tool, Vue CLI, comes with options…

Read More