I want to create a React app; that I would later like to take ahead to make a "production-level" app, and I am unsure about create-react-app.
Should I use it, or shouldn't I? npm eject scares me. Can anyone explain what npm eject does exactly, and whether if I would have any problems with not being able to add custom stuff to my build?
You can definitely use CRA for production apps and not just for prototyping. If your needs are satisfied with the configuration they already provide out of the box then it gets even more easy for you as you don't need to figure out how webpack works and all that stuff.
If you are not satisfied (this was our case) go on and user thier eject feature and then roll your own configurations for webpack and other scripts. Also many people have a question that if they eject, do they lose all the commands it provides such as build, run etc ? The answer is NO. You still have those commands intact and they work as always except that now you can modify them easily and extend as required.
We for one are using CRA in prod after ejecting and there haven't been any issues :)
Gosha Arinich
Consulting software developer
Create React App is a great way to start development, it provides quite a few sensible default that make the overall development experience classier.
If you know webpack, it saves you time. If you aren't very comfortable configuring webpack, it saves you even more time.
The best thing is, you can get out of CRA any time by ejecting. Don't be scared! What
ejectdoes is, it copies the webpack config and a few other config files from thecreate-react-appmodule right into your project. It's an escape hatch.So at this point, you don't have a create-react-app dependency anymore, you have a regular set of config files that you can customize at will — add some additional loaders or plugins, for one. The only thing you [obviously] loose is Create React App, which includes updates to it.
(CRA also has a discussion at the moment about allowing some customizability without requiring to eject.)
I have had a client recently bootstrap a project with CRA and immediately eject to customize it to their liking, which speaks volumes about the ease of getting started!