DEV Community

Discussion on: Downsides of TypeScript?

Collapse
 
phryneas profile image
Lenz Weber • Edited

Since 2019 we officially recommend using Redux Toolkit, which not only gets rid of most boilerplate, it also gets rid of almost all TypeScript annotations.
Modern Redux at this point is almost completely inferred, with a few manual type casts during setup that cannot be avoided. Please see redux-toolkit.js.org/tutorials/typ...

Also, you don't write any switch..case reducers, ACTION_TYPE constants, hand-written action creators or immutable reducer logic any more.

If you want to see how modern Redux looks like with TypeScript, just do npx create-react-app my-app --template redux-typescript and take a look around.

Honestly, I don't know what else we can do except repeatedly communicate that on all available channels.
I don't see how we're at fault for devs not ever revisiting the documentation for years and years.

Collapse
 
fkhadra profile image
Fadi Khadra

I think one of the main issue is that most people don't read the documentation 😔.

Thread Thread
 
phryneas profile image
Lenz Weber

Yeah, that's why we're also commenting on articles ^^

Collapse
 
rammina profile image
Rammina

Thank you for very much for informing us. This helps a lot because seems like not many are aware of this. Going to try it out!

Collapse
 
latobibor profile image
András Tóth

This is great news, I will check it!