Reputation: 91
I'm a beginner in ReactJS also for NodeJS. I would love to know why we have to install NodeJS run ReactJS application as ReactJS is client-side scripting.
Upvotes: 7
Views: 9041
Reputation: 1
Of course, you don't have to. When you are in the development step, you can install it for package management. Only webpack is needed to bundle, compile, transpile the code.
Upvotes: 0
Reputation: 777
The other answer is incorrect.
You don't NEED Node.js, in fact you could create a project without running a single npm
command. Just follow this guide.
The main reason, as pointed out in the article, is:
<h1>Hello Word</h1>
reads so much better than React.createElement('h1', null, 'Hello World')
Upvotes: 13
Reputation: 1835
Because almost all the JavaScript libraries/frameworks are using the Node Package Manager (NPM), that makes much more convenient to manage JavaScript dependencies in general, both client-side and server-side.
Edit: It's not really technically
necessary, but using a package manager is the best practice for managing dependencies and sub-dependencies.
Upvotes: 4