React Beginner

aryan inglearyan ingle
2 min read

Problems that I encountered:

  1. I deleted few files using command remove ; because of it I was not able to run the file in the browser it was giving me an error as : "Module not found"

    Solution : I used the command for installation again ;I tried seeing it on stack overflow ๐Ÿ˜’ but it was hard for me as a beginner so I installed it again, and it worked .

Commands I used :

  1. npx create-react-app myfirstapp

  2. npm start

  3. npm install

  4. npm init vite animalfarm

  5. npm run dev

What I Learned:

  1. Installing react :

    a. Opened command prompt

    b. Used this command: 'npx create-react-app myfirstapp' to create a react application of name 'myfirstapp'.

    c. React was not installed in pc so it started installing necessary packages.

    d. This command used to start my application after cd/myfirstapp :

    ' npm start'

    d. A local and my network url having a port number is given through which I can see this on browser .

    e. To exit click 'ctrl+c' on prompt command.

  2. New Tool:

    npm init vite animalfarm ; I got to know a new tool name "vite" I will use react framework, creating a file "animalfarm";

    in commmand prompt using "h + enter"

    it shows few shortcut keys :

  1. npm run dev; this command is used to execute and shows this page below in the browser , if I click on the count button it increments the count,

    if I reset the server the count goes to initial zero.using "u+enter" it shows the url of server.

1
Subscribe to my newsletter

Read articles from aryan ingle directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

aryan ingle
aryan ingle