Learn Reactjs in 60 Seconds #reactjs #javascript #mernstack

Posted by


Reactjs is a popular JavaScript library used for building user interfaces. It is often used in conjunction with other technologies like Nodejs and MongoDB to create full stack web applications. In this tutorial, we will cover the basics of Reactjs in just 60 seconds.

  1. Installation: To get started with Reactjs, you first need to install Nodejs on your machine. Nodejs comes with npm (Node Package Manager) which is used to install Reactjs. You can install Reactjs by running the following command in your terminal: npm install react react-dom

  2. Create a new React app: Once you have Reactjs installed, you can create a new React app by running the following command in your terminal: npx create-react-app my-app

  3. Create a component: Components are the building blocks of a React app. You can create a new component by creating a new JavaScript file and importing React at the top of the file. Here’s an example of a simple component:
import React from 'react';

function MyComponent() {
  return (
    <div>
      <h1>Hello, React!</h1>
    </div>
  );
}

export default MyComponent;
  1. Render the component: Once you have created a component, you can render it in the main App component by importing it and using it like any other HTML tag. Here’s how you can render the MyComponent component in the App component:
import React from 'react';
import MyComponent from './MyComponent';

function App() {
  return (
    <div>
      <MyComponent />
    </div>
  );
}

export default App;
  1. Run your React app: Finally, you can run your React app by navigating to the root folder of your app in the terminal and running the following command: npm start

And that’s it! You have now created a simple React app with a component that renders "Hello, React!" on the screen. Reactjs is a powerful tool for building dynamic and interactive web applications, and by mastering its fundamentals, you can create stunning UIs with ease.

0 0 votes
Article Rating
38 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@gyaniguru3639
1 month ago

Vue also does the same and is easy, minimal and simple.

Very good for beginners.

@mayurgudi381
1 month ago

Angular also does this !

@rahulsyt_
1 month ago

until it is State Management, Pagination etc 😢

@kunal6766
1 month ago

Ye sab MU ke exam me english me likhunga 😮😊🎉

@faizanalam8823
1 month ago

But angular ke sath kyu compare kara tum hi ne to kaha tha angular framework hai react library🏫📚

@adityaprakash2403
1 month ago

I am waiting for the explanation 😂

@ProgrammingGyann
1 month ago

Wait but Why u eating mango like banana😅😂

@ajitkumar_dev
1 month ago

Kya dekh liya 😑

@nishulpatni7728
1 month ago

Bro is only good at editing. Do your research completely

1. Component based (react, angular, vue) all have this
2. SPA (react, angular, vue) all have this
3. Virtual DOM (react, vue) have this

All there have their own goods but why do developers like react, react provides simpler learning curve, huge community, Offers high flexibility because it's just a UI library and some other things

@helloswayamshah
1 month ago

Bro reactjs is a framework not a library

@binu24668
1 month ago

bro seriously, have you ever even used vuejs ?? Vue js is faaaaar more easy to use than react.

@ManojKumar-bp7pf
1 month ago

Theory definition me ittni smaj me nhi aayi jitni funny acting ki wajah se definition smaj aagyi

@sanchitbatra4431
1 month ago

Angular bhi yhi krta hai lodu zone

@manto7
1 month ago

Vue dekha nhi is bichary ny

@rahul900day
1 month ago

VUE laughing at a corner

@TheAditya64
1 month ago

Over Acting mat kr ….

@neerosity
1 month ago

"reactjs" ke nai "AAM kaise khaye" ke bare me ha

@abhaysahu9591
1 month ago

Bhai video acchi the bss tum aam na khate to ghinapan thoda kam lagta

@heartmusic4398
1 month ago

bhai ye vedio dekh kar interview diya tha interviewer bola ye kya bwaseer bta diya he be.

@Rajeshk78929
1 month ago

Me(worked on angular and vue)
All the points covered in both(not VDOM IN ANGULAR)