DEV Community

Discussion on: TypeScript - The Best Way to Use It with React

 
omerwow profile image
Omer Elbaz

You're right, I added this to the article, thanks.

Also, this article is meant for beginners that want to get started and experiment with TypeScript and React, it does not claim to have anything production ready :)

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇

It's worth mentioning though.
In tones of companies they ask explicitly to "create a react app without using create-react-app executable" in the tech interview process, and for good reasons;
Being able to tweak the initial setup means (to a certain point) that you understand the needs of the acceptance criteria (so don't overengineer) as well as the basics to maintain those pieces of software up to date and aligned to the project needs as well.

If you didn't yet, try to set up a React application with Parcel bundler instead webpack, maybe use mocha and/or other stuff for testing and so on. Do it step by step and full-forward.
If you use create-ract-app and then start deleting dependencies and adding new ones you'll probably end up with a mess and loosing a good amount of time and the knowledge gathered from that experience will be negligible.

Instead, add the dependencies one by one when they make sense and don't hesitate to use npm audit to check if there's any known bug or weakness on any used package as good practice.

Best regards.

Thread Thread
 
brense profile image
Rense Bakker

Yea I've moved away from webpack, I'm using vite now to build my React apps.

Thread Thread
 
brense profile image
Rense Bakker

CRA also comes with a nice collection of critical vulnerabilities (inside webpack dependencies) that havent really been fixed for almost half a year now...

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇

Never tried Vite yet. For personal projects I always use Parcel for the "ease of use", rollup didn't catch it much and Webpack makes me feel like it's a whole new thing each version 😅

BTW I'm using Next JS for both sideprojects and work since a year ago and it comes with webpack so... Here we are. Glad I don't need to edit it, it works with the next.config instead 😂

Thread Thread
 
brense profile image
Rense Bakker

Yea webpack is ok if you dont have to touch it lol. It's really slow though... I think there's a Next JS alternative that uses vite... dev.to/cyco130/rakkas-nextjs-alter...