3 ms·
CRA 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 opinio
by smdz 10y ago
CRA 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.