4 ms·
What does "ejecting" mean?
by jczhang 9y ago
What does "ejecting" mean?
- pfranz 9y ago(I might be wrong on the specifics) create-react-app abstracts a bunch of things for you. Ejecting bakes out those things (dependency versions and configuration files), but can no longer update create-react-app after that or "unbake." https://github.com/facebookincubator/create-react-app#converting-to-a-custom-setup https://github.com/facebookincubator/create-react-app#conver... Usually, you'd want to do this if you want do implement one of the "limitations" cited or if you had specific things to configure that had been abstracted away. For example, the release notes mention webpack 2 changed their configuration. If you hadn't ejected yet there's nothing to do because they took care of it on the back end, if you had ejected you have to update your webpack config.
- jczhang 9y agoGot it, thanks for the explanation. Not sure what "bake" means either exactly but it seems to read like it fixes versioning or sets up specific configs / changes such that you are not tied to the update / release cycle of the larger app.
- pfranz 9y ago"Bake" would mean write out the config files permanently. Not sure how it works on the back end but imagine create-react-app writes out a config on-the-fly each time you launch it. That means it can update the dependencies and makes sure everything places nice together when changing versions. Writing out config files give you more control, but you'd have to update the tools and config manually and might mess up dependencies. In my experience, setting it all up and getting dependencies is one of the pain points with react, so it's nice to get some sane defaults and get to writing your app. But it is nice to take the time to do everything manually at least once to see what's under the hood.