DEV Community

Cover image for The React Typescript path - 2020
Alexandru-Dan Pop
Alexandru-Dan Pop

Posted on • Edited on • Originally published at blog.alexandrudanpop.dev

The React Typescript path - 2020

I get this question from time to time:

How to start using React with Typescript (TS)?

Let's be honest, Typescript can be intimidating if you've never been exposed to a typed language before.

In this article, I will explain how you can start programming UI's with React and Typescript.

Who should consider this

  • intermediate JS developers
  • React developers that want to learn writing React code in TS

What's the minimal start

I encourage people to start learning React without TS first. After you build a few sample apps using just React and JS, you can start looking at:

1) A TS Crash Course
This will teach you the bare bones of TS, that you need to get a hang of before combining it with React.

2) A a React TS tutorial
This will teach you the basics of what you need to know for successfully using TS with React.

3) Read the React-TS Cheat sheet
This can be found here, and it's gold. โญ
A very handy resource of how to use TS in React Function components, classes, hooks, etc. There are even migration guides, telling you how you could approach the migration from a JS-React app to a TS-React app.
React-TS-Cheat-Sheet

How to really learn ๐Ÿง 

Don't just watch the tutorials, but actually have them set up on your computer and follow them, while you watch the videos. After you watched the videos, try to tweak those small applications and extend them a little bit.

Don't rush the process and be consistent. You cannot learn everything about using React with TS in a few days. Be consistent and build some things with those technologies. ๐Ÿ—๏ธ

Live long and enjoy TS

Hope this helps, now you should be able to use TS in any React codebase, enjoy!

Live long gif

Leave a ๐Ÿงก & ๐Ÿฆ„ if you like this article, also check out my Twitter where I post more cool content.

๐Ÿ‘‡ Comment below ๐Ÿ‘‡
What other cool learning materials exist for React & Typescript out there?

Top comments (0)