Monday, 7 January 2019

ReactJS: How to create your first ReactJS application

1Install ReactJS globally in your local system or drive

EE:\>npm install create-react-app -g

s

  
  Note: React Applications cannot be allowed capital letters while you are creating using the command prompt.

EE:\>create-react-app myFirstReactApp
C Could not create a project called "myFirstReactApp" because of npm naming restrictions:
  *  name can no longer contain capital letters


  Create the react app using the admin command prompt
c  reate-react-app myfirstreactapp












d















      In the above screenshot when you create a ReactJS application it is adding a development server, all required web pack to run the react application, Babel. So to run the react application we don't need to do any type of configuration.

  Once everything installed you will get below the screen in the command prompt.


s


a    To run the created react application navigate to root folder and type npm start. The application will open in the browser using the light server.
      See the below screenshot:


    To open the application in Visual Basic Code simply type 
   code . in the command prompt.

   To terminate the application press Ctrl+C. The light server will stop prompting "Terminate batch job (Y/N)? y"




No comments:

Post a Comment