4 ms·
Sane defaults and pieces made to go together are critical to lowering the adoption barrier and building a community, so huge props for that. But no ability to c
by kcorbitt 10y ago
Sane defaults and pieces made to go together are critical to lowering the adoption barrier and building a community, so huge props for that. But no ability to configure anything at all? I think that for most people, at some point there will be some small change to the default configuration their environment will require[1], and that means they'll need to jettison the entire project. It's nice that this is easy to do, but it would be better if it weren't necessary.
[1]: For example, I run my app from within a Vagrant Virtualbox machine that doesn't forward filesystem notifications correctly, so I have to configure Webpack's hot reloader to poll for changes instead of listening for fs events.
- sotojuan 10y agohttps://facebook.github.io/react/blog/2016/07/22/create-apps-with-no-configuration.html#no-lock-in https://facebook.github.io/react/blog/2016/07/22/create-apps... > “Ejecting” lets you leave the comfort of Create React App setup at any time. You run a single command, and all the build dependencies, configs, and scripts are moved right into your project. At this point you can customize everything you want, but effectively you are forking our configuration and going your own way. If you’re experienced with build tooling and prefer to fine-tune everything to your taste, this lets you use Create React App as a boilerplate generator.
- danabramov 10y agoWe’ll start with extremes (no config vs all config is yours) and see how people use it. Perhaps we’ll add some configuration later but if we do it too early, we might as well become another webpack. Configuration makes it very hard to move forward or swap underlying tools. So we’ll stick with no configuration for as long as we can, and try to figure out a way to solve common problems by other means (e.g. smarter detection, platform-specific code, etc).
- andrewstuart 10y agoPlease Dan keep it zero configuration. If a person knows enough to want to configure, then they have learned enough to venture out on their own via eject. The difference in cognitive load between "zero config" and "some config" is enormous. "zero configuration" === minimal mental model, no scope for misunderstandings, misconfigurations, minimal documentation, almost no scope for user errors and also minimal learning time "some configuration" - even one single switch/option === learning the mental model, understanding, version problems with the old way of configuring, documentation of configuration, potential for errors, old & out of date blog posts on the Internt telling how to do it the old way, beginner pain You will come under constant pressure from people who want to add "just this one teensy option" and will criticize the project for not having it. Resist the criticism - beginners need zero config. The root of all evil in JavaScript development and build systems is configuration.
- koistya 10y agoI just published a similar tool: > npm install -g react-app-tools > react-app new > react-app start The idea is to have no configs (though you will be able to configure anything if needed) and a bare minimum package.json: { "private": true, "dependencies": { "react-app": "^1.0.0", }, "devDependencies": { "react-app-tools": "^1.0.0", }, "scripts": { "build": "react-app build", "start": "react-app start", } }
- jlongster 10y agoIt doesn't even support hot reloading. No config means they can make assumptions about how things work which makes it really to share solutions for things like "optimize this for prod" or other use cases that are typically a lot of work for your custom setup. However, I predict that there will be a softer escape hatch than "eject". At least a single option to take the webpack and config and whatever you want with it, at your own peril. This would be completely unnecessary unless you really Know What You're Doing.
- andrewstuart 10y agoThe important thing is that new users need a zero configuration way in to the technology. Once you have done some coding, found your feet and stepped up a few levels of comfort and understanding, then sure thing, start venturing out into the world of configuration via "eject". I think it's a good thing that it is pure zero configuration. If you want to configure then you have graduated.