---
title: "Discussion on \"React.js: Switch from PropTypes to TypeScript\" | Hashnode"
description: "Discussion on \"React.js: Switch from PropTypes to TypeScript\". If you are a React.js developer and does not use TypeScript, this article is for you!\n📱 Props are a communication channel\nComponents are the core feature of the React library. It allows us a real separation of concerns. For building a complete UI, w..."
url: "https://hashnode.com/posts/switch-from-prop-types-to-typescript/601984510394d00f62dc497e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [React.js: Switch from PropTypes to TypeScript](https://blog.reactstory.com/switch-from-prop-types-to-typescript?utm_source=hashnode&utm_medium=feed)

If you are a React.js developer and does not use TypeScript, this article is for you! 📱 Props are a communication channel Components are the core feature of the React library. It allows us a real separation of concerns. For building a complete UI, w...

Feb 2, 2021 · 10 min read · blog.reactstory.com  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#props](https://hashnode.com/tag/props)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#vscode](https://hashnode.com/tag/vscode)
-   [#eslint](https://hashnode.com/tag/eslint)

## Written by

[Maxime Vasse](https://hashnode.com/@webdif)

@webdif

  
[View profile](https://hashnode.com/@webdif)

The story of a React.js developer

## Responses 2

Markdown supported · ⌘↵ to post

[Christos Lytras](https://hashnode.com/@LytraX)

[Feb 6, 2021](https://hashnode.com/posts/switch-from-prop-types-to-typescript/601984510394d00f62dc497e/comment/601e79bc1054fa16dadd8b23)

TypeScript is good for when creating projects that many people are going to contribute or libraries that many people are going to use, but for big/small _one-man-show_ projects is such a waste of time writing all the typings and if you have enabled ESLint with some standard defaults, then you'll find yourself wasting countless minutes trying to satisfy TS compiler and linter especially when trying to convert JS code to TS and of course keep `tsconfig` options to strict typings mode.

TypeScript is awesome for DX and when many people are involved in one project but for larger projects it's going to bloat the code and it doesn't provide much on bug catching; **proper testing should always be present in all projects small or big ones**, and that's what prevents bugs mostly.

There is even a ESLint rule for requiring `PropTypes` when optional props do not have default values [`react/require-default-props`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md) and it does appear in TS projects as well and it actually makes sense.

[Maxime Vasse](https://hashnode.com/@webdif)

[Feb 6, 2021](https://hashnode.com/posts/switch-from-prop-types-to-typescript/601984510394d00f62dc497e/comment/601e79bc1054fa16dadd8b23#reply-601ea9ef1054fa16dadd903c)

You can very well use TypeScript without typing each of the variables or functions you use. I think it's really nice to have TypeScript in addition to a test suite. Like any tool, you have to set it up at the beginning, but then, it's paradise!

[Catalin Pit](https://hashnode.com/@Catalinpit)

[Feb 4, 2021](https://hashnode.com/posts/switch-from-prop-types-to-typescript/601984510394d00f62dc497e/comment/601bd3d8072bc516ff6f2064)

A nice, informative, in-depth tutorial. I enjoyed it!

Well done!

P.S: TypeScript is something I want to learn. 👀
