4 ms·
CRA is a set of best practices for setting up a React app. Even if you do stuff by hand you can run CRA and see how the experts do it.
by getpolarized 8y ago
CRA is a set of best practices for setting up a React app.
Even if you do stuff by hand you can run CRA and see how the experts do it.
- Waterluvian 8y agoI think a great option is a collection of example configurations for a stack. When learning Webpack, 90% of my learning was by looking at other examples. The hardest part was making sure I wasn't looking at out of date examples. The unfortunate thing about CRA is that it's another tool on top of a tool to learn. It's not just instant and obvious, it has its own layer of configuration and understanding of how not to break it, how to upgrade it, etc. So people spend time learning the tool's tool instead of the tool. I'm also not convinced this is "how the experts do it."
- petetnt 8y agoHi there, Create React App is by default zero configuration and we do our best not to make it possible to break it. For example you cannot access the configurations of Webpack for this reason. We do allow some configuration through environment variables[0] but try to minimize amount of those too (and some of them will probably get removed in future version too). The public API is around 4 commands (start, build, test, eject). This makes it possible to make big changes underneath the package in even minor versions (eg. updating major version of Webpack) without breaking existing CRA-powered apps. You can see migration guides for every single version in the Changelog, usually consisting running a single command[1]. This was also true for the major update from 1.x to 2.x [2] [0](https://facebook.github.io/create-react-app/docs/advanced-configuration https://facebook.github.io/create-react-app/docs/advanced-co...) [1](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md#migrating-from-213-to-214 https://github.com/facebook/create-react-app/blob/master/CHA...) [2](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md#migrating-from-1x-to-203 https://github.com/facebook/create-react-app/blob/master/CHA...) That said, it does take some effort to understand the benefits and limitations of CRA. How could we improve on that one? Disclosure: Doing maintenance work on CRA