DEV Community

Code smells in React with TypeScript Survey

Maykon on October 25, 2023

👋 Hello! In recent months, my thesis advisor and I have been working on my Bachelor's thesis, aimed at investigating code smells in React applicati...
Collapse
 
adaptive-shield-matrix profile image
Adaptive Shield Matrix

For new devs using typescript + react: this is the most comprehensive and complete reference, docs and tips I found and use
github.com/typescript-cheatsheets/...
more readable web version - react-typescript-cheatsheet.netlif...

  • Its a big list, so take your time going it through
  • Fully discussed in the open with a very big community
Collapse
 
xr0master profile image
Sergey Khomushin • Edited

For "Children Props", it's better to use the "PropsWithChildren" type from React.
The "Multiple Booleans for State" is also not obvious; it can be in loading and visible state in the same time, for example.

In fact, this survey does not apply to React, but to TS. Instead of React, we can use NodeJS (as an example) and everything will be the same. (almost)