My first ReactJS app from scratch


ReactJS is a JavaScript library for developing user interfaces (UIs) which efficiently update when your data changes

ReactJS apps are very performant since ReactJS uses a virtual DOM which is a JavaScript object representing the regular DOM. The virtual DOM is much faster than the regular DOM

To install ReactJS on your computer open a command line and type:

$ npm install -g create-react-app

Proceed to create a new ReactJS project:

$ create-react-app myProject

Change to the directory where you just created your new ReactJS project and type:

$ cd myProject

$ npm start

to launch the developer server and open your localhost on port 3000 i.e. (http://localhost:3000)

Today we are going to write a small ReactJS app with a + and – button to add and to substract 1 to a counter:

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">