/ReactNotes

My notes and code snippets while I learn React JS. Have a look, maybe it can help you too.

Primary LanguageJavaScript

My Notes and Code Snippets of React JS

Steps to create a basic react app project

Make sure you have node and npm already installed on your system.

  1. Create a folder on any location on your system. Open that folder with code editor (for eg. VS Code).
  2. Go to terminal of VS Code.
  3. In the terminal type npx create-react-app projectname. Here the "projectname" is userdefined name so you can give any name instead of it.
  4. It will take some time to create the react app, so wait patiently. Once it is done you will be able to see the folder named as "projectname" in the folder you were in.
  5. Type cd projectname in the terminal in order to move to the default react app created. Once you are inside that projectname folder in terminal, you can start coding.
  6. In order to run react app, type npm start in the terminal. Make sure you are in the projectname folder only.
  7. Once you type npm start, a default react webpage will run on the browser. From here you can go back to VS Code and start building and coding.

Bookmark the Sites

  1. Official site of React JS
    • This is the official site of React JS and you can check the whole documentation here.
  2. Material UI
    • This site is great to choose sample codes and icons for your react application.
  3. How to Style your react app?
    • To understand how to style your react components
  4. UseRef() in React
    • This is a good article to understand what is useRef() and useState() in react.