Member-only story
5 TypeScript Lessons That Will Pay Off
Did you know about #5?

Stay on the cutting edge of React and TypeScript by following me on Twitter at https://twitter.com/antondevv.
Enjoying Medium? Get full access to Medium by clicking here
In this article, I will cover 5 TypeScript lessons I have encountered in my TypeScript development journey. So let’s get started!
1. Write types for others ✅
What I learned is that you don’t write all of this extra layer of code for yourself; it’s mostly for other developers in your team or for whatever project you’re working on that involves multiple developers.
So, whatever naming convention you choose for the types, interfaces, etc., make sure to follow best practices and make it simple for others to understand what the types are about and what they’re for.
Consider a user object for which you need to write a type for: Here’s how I’d go about it:
type User = {
email: string;
name: string;
...
}
So the user type is named User
which pretty much indicates that it’s a type for the user.
And make sure to follow the best practices for naming conventions, etc. You can read more about the best practices here, that’s usually what I…