Three questions when starting with React.js.

Subscribe to my newsletter and never miss my upcoming articles

Three questions when starting with React.js.

1 - Why Do I need to use npm, npm does not stand's for Node.js, why I need it to deal with npm in a javascript react.js front-end project?

Javascript is now I full-featured programming language and like one there are some ways to manage the dependencies. Npm is one of those ways. Is the same logic to

  • Nuget and .net
  • Composer and PHP
  • Java and Maven

2 - In my early days as a web developer I put the cdn hosted scripts on bottom of my html body tag and had to create that scripts that I needed, how I do that in a react.js project ?

This is still the way that js will be placed on the html, but now react.js will be in charge to put the deployment version script on the html page.

3 - Why there is a development server and a deployment version on React Project ?

Modern javascript frameworks like compiled languages put in one side the code repository and assets and on the other side a folder or set of folders that will be the deployment version. In this folder called "build" will be all the files that the js project needs to work and also an html that works as a page root.

1 - $: npm install react

2 - $: npm install create-react-app myProject

4 - Development Process

3 - $myProject: npm run-script build ( creates a deployment version on the build folder of the project)

No Comments Yet