5 ms·
In the case of React, the team behind Create React App [1] is doing an excellent job at taking care of all the build system, with only one Dev dependency: a scr
by nip 10y ago
In the case of React, the team behind Create React App [1] is doing an excellent job at taking care of all the build system, with only one Dev dependency: a script, which allows developers to focus solely on their non dev dependencies while providing all the necessary tooling to focus on doing their job: crafting software.
You can "eject" from this beginner friendly mode if you want to have more freedom.
Funny thing is that we "ejected" on our current project, but I'm contemplating moving back to CRA as it just makes developing our React app super easy and stress-free.
[1] https://github.com/facebookincubator/create-react-app https://github.com/facebookincubator/create-react-app
- smdz 10y agoCRA helps starters with plain React, but I believe CRA doesn't come in default with Redux (react-redux), react-router, redux-thunk. And useful (arguably opinionated) stuff is missing like react-hot-loader, redux-logger, sass-loader, font loaders, customized webpack and webpack-dev-server. Also it does not differentiate between smart and dumb components. For large complex SPAs, all that stuff is very useful.
- acemarke 10y agoCorrect, because none of those are needed for use with React itself, and different applications will use a wide variety of different libraries (Redux vs MobX, etc). Also, the phrase "doesn't differentiate between smart and dumb components" is pretty irrelevant in this discussion, because that's merely a conceptual distinction. I did actually open up a discussion a couple days ago asking for discussion on what kinds of "official Redux-based addons" might look like: https://github.com/reactjs/redux/issues/2295 https://github.com/reactjs/redux/issues/2295 . Possible ideas include things like a small "redux-starter" wrapper library that sets up a store with sensible defaults. Dan Abramov also tossed out a list of ideas for a hypothetical more in-depth integrated library built on top of Redux's core behavior.
- nip 10y agoBut that's the point of CRA, just taking care of the build tools. React-redux, React-router, Redux-thunk are all dependencies (as opposed to dev-dependencies/build utils) that might or might not be needed.