Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • React Tutorial
  • React Exercise
  • React Basic Concepts
  • React Components
  • React Props
  • React Hooks
  • React Router
  • React Advanced
  • React Examples
  • React Interview Questions
  • React Projects
  • Next.js Tutorial
  • React Bootstrap
  • React Material UI
  • React Ant Design
  • React Desktop
  • React Rebass
  • React Blueprint
  • JavaScript
  • Web Technology
Open In App
Next Article:
React JS Basic Concepts Reference
Next article icon

React JS Basic Concepts Reference

Last Updated : 21 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

React is a library and not a framework. It was developed by Facebook to address its specific challenges. Understanding a new library or framework can be exciting, but it's important to first grasp its core concepts. 

Setting Up the Development Environment

Before going into the practical aspects of ReactJS, it is Important to set up the development Environment. This guide will walk you through the process of installing the necessary tools and creating your first React Project.

Prerequisites:

To begin, you will need Node.js and npm(Node Package Manager). Node.js is a JavaScript runtime that allows you to run JavaScript outside the browser, while npm is used to manage your project’s dependencies.

1. Install Node.js and npm:

  • Visit the Official Node.js website and download (https://nodejs.org/en/download) the version recommended for most users.
  • After Installation, verify that everything is working by running the following Commands in your terminal.
$ node --version

2. Code Editor: While you can use any text editor, Visual Studio Code is highly recommended for its syntax highlighting, auto completion, and Git Integration.

Here’s a list of some good code editors you can explore:

Create a New React.JS Project

1. Install Vite and Create a Project

bash
npm create vite@latest my-react-app -- --template react 


Replace my-react-app with your desired project name.


2. Navigate into your project directory

bash
cd my-react-app 


3. Install dependencies:

bash
npm install 


4. Start the development server:

XML
npm run dev 

This will launch the app in your browser at http://localhost:3000.

Understanding the Project Structure:

Your new React project comes with a predefined structure. Here are the key files and folders you'll work with:

  • public/index.html: The single HTML file where your React app will be rendered.
  • src/index.js: The JavaScript entry point for your React application.
  • src/App.js: A basic React component that serves as the starting point for your app.

Example: In this example, we have implemented a basic react app with the hello world output.

JavaScript
import React from 'react';  function App() {     return (         <div className="App">             <h1 style={                 { textAlign: 'center' }             }>                 Hello, World!             </h1>         </div>     ); }  export default App; 

Output:

helloworld
Output


React Basic Concepts Reference

React Basic Concepts

Description

React JS Introduction to JSX

JSX (JavaScript XML) is a syntax extension for React.js that allows developers to write HTML elements.

React JS Rendering Elements

Rendering Elements in React involves efficiently updating the user interface by creating and updating virtual representations of the UI components.

React JS Components

Components in React are modular, reusable building blocks for UI elements.

React JS Components – Set 2

Components in React are modular, reusable building blocks for UI elements.

React JS Fragments

We may render a single element or multiple elements, though rendering multiple elements will require a ‘div’ tag called Fragment

React JS Props – Set 1

React allows us to pass information to a Component using something called props.

React JS Props – Set 2

React allows us to pass information to a Component using something called props.

React JS PropTypes

use the propType for validating any data we are receiving from props.

React JS State in React

React JS State is a way to store and manage the information or data while creating a React Application.

React JS Lifecycle of Components

Every React Component has a lifecycle of its own, lifecycle of a component can be defined as the series of methods that are invoked in different stages of the component’s existence.

React JS Conditional Rendering

Rendering based on the conditions called conditional rendering in React

React JS Lists

React Lists are very useful when it comes to developing the UI of any website

React JS Keys

React JS keys are a way of providing a unique identity to each item while creating the React JS Lists so that React can identify the element to be processed.

React JS Refs

React JS Refs are used to access and modify the DOM elements in the React Application.

React JS forms

In React Forms, All the form data is stored in the React’s component state

React JS Hooks

Hooks are used to give functional components an access to use the states and are used to manage side-effects in React.

React JS Router

In React mostly SPA are developed so Navigation is complex.

React JS ReactDOM

React provides the developers with a package react-dom to access and modify the DOM.

React JS Event Handling

Modern webpages rely on user interactions, triggering events like clicks or keypresses.

React JS Synthetic Events

Synthetic events in React are cross-browser wrappers around the browser’s original event.

React JS ContextAPI

Context API is used to pass global variables anywhere in the code.

React JS Controlled Components

React’s Controlled Components manage form data via component state, receiving values through props and updating through callbacks like onChange.


Next Article
React JS Basic Concepts Reference

K

kartik
Improve
Article Tags :
  • Web Technologies
  • ReactJS
  • ReactJS-Basics

Similar Reads

    ReactJS Components Complete Reference
    In ReactJS, components are the building blocks that help you create interactive UIs by dividing your app into smaller, reusable pieces of code. Understanding how components work is essential for efficiently developing React applications. In this article will provide a complete reference to React com
    3 min read
    ReactJS Props Reference
    In React, one of the key concepts that make it flexible and powerful is props. Props, short for "properties", are used to pass data from one component to another. They enable React components to be dynamic and reusable, allowing data to flow down the component tree.In this article, we’ll take a clos
    2 min read
    Advanced ReactJS Guide Complete Reference
    ReactJS is a popular library for building modern user interfaces. While many developers are familiar with its basic concepts like components, state, and props, there are advanced features that can take your React apps to the next level. By exploring these features, you can optimize performance, mana
    10 min read
    ReactJS Questions Complete Reference
    Every front-end developer and web developer knows how frustrating and painful it is to write the same code in multiple places. If they need to add a button on multiple pages they are forced to do a lot of code. ReactJS is the most used library in this field. The Complete List of ReactJS Questions ar
    4 min read
    React Rebass Guides Complete Reference
    React Rebass is a front-end framework that was designed keeping react in mind. React Rebass Guides are used for better formats, and styles, and to add some content and element using the Rebass box component. There is a lot of component in Rebass Guides like CSS Grid, MDX component, etc. React Rebass
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences