Getting started in React.js
getting started with react for absolute beginners
Introduction:
Understanding React.js is not rocket science, but when you dive into it,you’ll find it a lot deeper but somewhat simple.
Prerequisites:
Having basic programming skills and logic. I personally would recommend learn any programming language, JS is a plus and practice algorithms and logic thinking.
Let’s Start:
Create a new folder, i would suggest named “React” and in it open command line.
now type “npx create-react-app myfirstapp”, here myfirstapp is name of the app and you can change it the way you like.

have patience and wait a while and soon it will show something like this…

After this type “cd myfirstapp” and then type “npm start”.

Now this command line has become the server for your React App and while this command line is alive you can view your React App on your local server.

Now open folder React>myfirstapp>src in Visual Studio Code or any other Text Editor you like.
Now you’ll be seeing several files there, for now ignore everyother thing, and focus on App.css and App.js, since App.js is the main file that is rendered.

something this should appear, so let’s start from scratch, clear all the code in App.js and App.css.
Two Ways Path:
In React there are two ways, first is going by functions and second is going by classes,
Since function doesn’t support state so we’ll stick to classes for now.
App.Js

now above is the main code which is done whenever we create a new class file or class component.
Remember Render is function which is called infinite time and it return a single value i-e “div tag” but this “div-tag” can have multiple components inside of it.
place “<h1>My Name is Ahmad</h1>” inside “div-tag” and save the file.
if nothing goes wrong your App will be showing the output.

Congrats You have Completed Day 1.