I've just started learning React.js+Redux and I see that a lot of frontend projects use npm
as package manager.
Lets take this project for example - counter.
It contains package.json
file. If we take a look at contents of this file we will see that there are devDependencies
and dependencies
entries in it.
"dependencies": {
"react": "^0.14.7",
"react-dom": "^0.14.7",
"react-redux": "^4.2.1",
"redux": "^3.2.1"
},
"devDependencies": {
"babel-core": "^6.3.15",
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-react-hmre": "^1.1.1",
"babel-register": "^6.3.13",
"cross-env": "^1.0.7",
"enzyme": "^2.0.0",
"expect": "^1.6.0",
"express": "^4.13.3",
"mocha": "^2.2.5",
"node-libs-browser": "^0.5.2",
"react-addons-test-utils": "^0.14.7",
"webpack": "^1.9.11",
"webpack-dev-middleware": "^1.2.0",
"webpack-hot-middleware": "^2.9.1"
}
While I know what is the difference between devDependencies
and dependencies
I do not understand why the project lists react
, react-dom
, redux
under dependencies
section. From my understanding it is a frontend project which doesn't need anything installed on server to work in production.