Sign in
Log inSign up
Maxime Vasse

71 likes

1.6K reads

3 comments

Catalin Pit
Catalin Pit
Feb 4, 2021

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

Well done!

P.S: TypeScript is something I want to learn. 馃憖

1
Christos Lytras
Christos Lytras
Feb 6, 2021

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 and it does appear in TS projects as well and it actually makes sense.

1 reply
Maxime Vasse
Maxime Vasse
Author
Feb 6, 2021

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!