3 ms·
I've never fully understood Create React App. Is it for people who just churn out generic apps at a rate that the time to set up the dev env is a meaningful cos
by Waterluvian 7y ago
I've never fully understood Create React App. Is it for people who just churn out generic apps at a rate that the time to set up the dev env is a meaningful cost? I'm not sure I've found setting up webpack or whatnot to be all that time consuming.
My bigger concern is that I don't want to become a passenger rather than the driver of my environment and build pipeline.
- jblz 7y agoIt's a great way to get started building a "modern web app" for folks who aren't comfortable rolling their own e.g. webpack / babel configs. If you ever want to have more control, you can "eject" & customize however you like.
- sbilstein 7y agoHonestly the defaults are really nice. I rolled my own for several projects and then just used create react app for this startup and forgot about my build pipeline. Once I ejected it took a little hacking to get the index.html to work with handlebars cause I like to render a bunch of data and other stuff server side for speed optimizations. Now I use the same web pack pipeline CRA ships with and just point my server to serve static files from the build folder. I’ve removed the server component and now just have the script watch and build. I don’t believe in SSR for react and prefer handlebars for most things server side so this workflow suits me well.
- robjan 7y agoIf many people are doing roughly the same "thing" then surely it makes sense to automate that "thing". It's much like how we don't build and develop software for every business process: we look for an existing solution that is general enough to fit our requirements (usually Excel).
- The_rationalist 7y agoIt can do a lot of smart default that you don't necessarily know, especially for typescript support.
- pldr2244 7y agoFacebook offers an opinionated, production ready, battle tested framework for bootstrapping a modern React application with tooling/batteries included (with dependencies automatically maintained if you need to version bump to latest via react-scripts as a magical dependency). Unless you’re doing something so completely customised (and even then, ejecting from CRA is a blessed path), why WOULND’T you use CRA?
- ng12 7y ago> why WOULND’T you use CRA? It's worth noting that CRA is pretty complicated. My home-rolled webpack configs are significantly simpler than ejected CRA apps. If you're going to be making significant changes to the configs it's going to be a lot easier with a custom project.