Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yea, I just simply can't fathom how this can be considered necessary...

Surely half of the stuff is not required for the basic react dev tooling to work?



It isn't required, but create-react-app (CRA) is designed as a kind of kitchen sink toolkit that includes a lot of things that you might not need now, but could need later. For example, while it doesn't include Typescript directly, it includes a lot of the tooling you'd need to get started with Typescript if you wanted to. Similarly with Progressive Web Apps, i.e. apps that run in the browser rather than natively, it includes most of the tools you'll need for that, and then allows you to opt in at any time.

This makes CRA a good choice for someone trying to be particularly flexible, for example building an MVP or prototype where new features are going to be thrown in fairly randomly. But the cost is maintainability, particularly in terms of tending dependencies and keeping them up to date.

A more lightweight version might be Vite. Vite does a similar job of bundling different tools together into a single toolkit, but takes a simpler approach using more modern technology.

In my experience, you can get a long way just by installing Vite as a development dependency and React as a runtime dependency and going from there. This won't give you anything fancy like server-side rendering or routing, but it works for a simple application, and allows you to add in the extra tools when you need them.


Hate to say it but I get the impression (having learnt "hardcore" programming first then learnt react recently) that web dev struggles a lot from having smart-but-tasteless amateurs who don't know when to stop.

That and npm has gamified the package registry so one is incentive to funnel as much shit as possible if one cares about these things.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: