🌐
React
react.dev
React
React components are JavaScript functions. Want to show some content conditionally? Use an if statement. Displaying a list? Try array map().
Blog
Security researchers have found and disclosed two additional vulnerabilities in React Server Components while attempting to exploit the patches in last week’s critical vulnerability… ... There is an unauthenticated remote code execution vulnerability in React Server Components.
Learn
React does not prescribe how you add CSS files. In the simplest case, you’ll add a <link> tag to your HTML. If you use a build tool or a framework, consult its documentation to learn how to add a CSS file to your project. JSX lets you put markup into JavaScript. Curly braces let you “escape back” into JavaScript so that you can embed some variable from your code ...
v19.2
The React docs at react.dev provide documentation for the latest version of React · We aim to keep the docs updated within major versions, and do not publish versions for each minor or patch version. When a new major is released, we archive the docs for the previous version as x.react.dev.
Reference
Configuration - Configuration options for React Compiler. Directives - Function-level directives to control compilation. Compiling Libraries - Guide for shipping pre-compiled library code.
JavaScript library for building user interfaces
React (also known as React.js or ReactJS) is a free and open-source front-end JavaScript library that aims to make building user interfaces based on components more "seamless". It is maintained by Meta … Wikipedia
Factsheet
Original author Jordan Walke
Developers Meta and community
Initial release May 29, 2013; 12 years ago (2013-05-29)
19.2.4
/ 26 January 2026; 59 days ago (26 January 2026)
Factsheet
Original author Jordan Walke
Developers Meta and community
Initial release May 29, 2013; 12 years ago (2013-05-29)
19.2.4
/ 26 January 2026; 59 days ago (26 January 2026)
🌐
GitHub
github.com › facebook › react
GitHub - facebook/react: The library for web and native user interfaces. · GitHub
Declarative: React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and ...
Starred by 244K users
Forked by 50.9K users
Languages   JavaScript 68.1% | TypeScript 29.0% | HTML 1.5% | CSS 1.1%
🌐
Wikipedia
en.wikipedia.org › wiki › React_(software)
React (software) - Wikipedia
4 days ago - React creates an in-memory data-structure, similar to the browser DOM. Every time components are rendered, the result is compared with the virtual DOM. It then updates the browser's displayed DOM efficiently with only the computed differences. This process is called reconciliation. This allows the programmer to write code as if the entire page is rendered on each change, while React only renders the components that actually change.
🌐
Playcode
playcode.io › react
React Playground - Online React Editor & Compiler Free
Free React playground to build and test React apps online. Live preview, hot reloading, npm packages, and JSX support. No setup required, start coding React instantly.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Frameworks_libraries › React_getting_started
Getting started with React - Learn web development | MDN
React's primary goal is to minimize the bugs that occur when developers are building UIs. It does this through the use of components — self-contained, logical pieces of code that describe a portion of the user interface.
🌐
React
react.dev › learn
Quick Start – React
In React, there is no special syntax for writing conditions. Instead, you’ll use the same techniques as you use when writing regular JavaScript code.
🌐
React
legacy.reactjs.org
React – A JavaScript library for building user interfaces
React components implement a render() method that takes input data and returns what to display. This example uses an XML-like syntax called JSX.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › reactjs › react
React Tutorial - GeeksforGeeks
Virtual DOM: React updates only the changed parts of the DOM, resulting in faster rendering. One-Way Data Binding: Ensures predictable and easy to debug data flow. Component-Based Architecture: Breaks UI into reusable pieces, improving the code reusability and scalability.
Published   4 days ago
🌐
Visual Studio Code
code.visualstudio.com › docs › nodejs › reactjs-tutorial
Using React in Visual Studio Code
November 3, 2021 - React JavaScript tutorial showing IntelliSense, debugging, and code navigation support in the Visual Studio Code editor.
🌐
CodeSandbox
codesandbox.io › s › react-new
React - CodeSandbox
December 6, 2024 - React example starter project
Published   Apr 01, 2017
Author   CompuIves
🌐
OneCompiler
onecompiler.com › react
ReactJS Online Editor & Compiler
OneCompiler's ReactJS online playground helps you to write, compile, run and view ReactJS code online. It have all the features like auto-completion, syntax highlighting, etc.
🌐
Reddit
reddit.com › r/learnprogramming › please explain what react is like i'm 5
r/learnprogramming on Reddit: Please explain what React is like I'm 5
July 13, 2018 -

Just the general gist of it. What part(s) of the general HTML/CSS/JS flow does it simplify/automate/replace? Does it do back end stuff? Is it just a .js file you refer to like jQuery, or is it a big voodoo thing you have to set up on a server like Node?

I'm kind of a thick one so I really do need it explained like I'm five. Thanks.

Edit: Thanks so much for all the responses! I feel like I have a much better understanding now.

Top answer
1 of 5
48

React is a JS library you use to create UIs. So in that sense it's like jQuery. However, it does some very smart stuff to make UI development better:

  • Instead of directly editing the DOM (the page) every time you want to change the way something looks, React uses a virtual DOM (basically a big JS object that represents the whole page) which it can edit super fast and only "publish" its changes to the real DOM when everything is ready. This way you don't make five little changes causing five redraws of the page; you batch your changes together so the browser only has to redraw once. Fast.

  • It lets you write independent components which can easily be combined to build pages. One benefit of this is consistency.

  • It forces you to treat data with care. Data is supposed to only flow from parent components to children. This makes it much harder to cause problems where the state of a particular part of your application is being influenced by the outside world.

  • It encourages immutability, which in turn makes stuff easier to test, less bug-prone, and so on.

2 of 5
25

Okay in the beginning there was HTML and HTML was static and then someone/group said "Let it be dynamic" and poof (insert sound effect) javascript was created. We have that much covered.

Javascript was pretty flawed from what I hear (i didn't know what a programming language was back then) and people needed some common stuff when building websites or webapps to bring it to life. Hence jQuery. John created this library and it really shined and helped people back then (and still does today) where it made ajax calls, dynamically updating the DOM, and cross-browser compatibility a pleasant experience you can watch some of his inspirations behind jQuery

So as many things in life, things change and grow and developers demanded some things and because of such things other things such as libraries and frameworks are created. You see the pattern here, there is a demand for certain functionality someone or a group of someones build it and it continues to grow.

Now React... What it is... its just a library, a javascript library , like jQuery that was created to solve a problem/s. That is all that it really is. just a library, like Angular is just framework and Brainfuck is really a language.

How does it help? An example is this, (i am assuming you are acquainted with HTML) say you have an html element like this

<table class="fancy-shmancy">

  <tr>

   <th> Foods</th>

   <th>Rating</th> 

  </tr>
 <tr>

  <td>Pizza</td>

  <td>9.8/10</td> 

</tr>

</table>

you got this nice table going on with nice css and its great. Now let us say I have many web pages and on each web page I have the same table but different values. Can you see how its going to get tedious real quick. What would be great if there was a way we can just build the layout of the table and fill it in with the different values in the different pages instead of writing this markup over and over and over again.

Enter React.

In this situation for example React would help us by making this a component. a reusable component that we could use as many times as we want in as many pages as we would like. With the added bonus of even getting the "fancy-shmancy" CSS class on each render!!!

And assuming you allow people to change the values of the ratings for example, instead of destroying the entire markup of the page and recreating it , or adding specific ids to the rows that you have to keep track of to change , React allows us to do it in an easier fashion, it does this wonderfully by already having a copy of the DOM (basically how the page was looking and all of the markup) and when someone updates the values it checks its copy of the DOM against the one that was just submitted and realises where the change should be made and only updates that specific part. They call this the Virtual DOM.

We again meet this pattern,

Demand for a certain function = library or framework (sometimes not always ofcourse)

And lastly incase you were confused by JSX, its just JavaScript dressed in certain way to make it easy for our familiar-pattern-loving brain, to make it resemble HTML. that is all, its just dressed that way. It later is built into regular JS because the browser doesn't understand JSX.

Regarding what is the flow? You can create as many cool components as you want, but if you aint got no HTML file to render this JS your pretty much letting it rot and no one will ever see it, not even you.

So you create and HTML file, usually called index.html, with an element where you want to render the react part of your application and you give it an ID. You now have an entry point much like jQuery's ('el').whatever function and you call the React render function on that specific element. and voila you are done. that's about it. You can create an entire application with just one <div> element in the HTML markup because you can create components and put those together under one big App component and render it.

I hope this was helpful

Edit: formating and links

Why React was created

🌐
W3Schools
w3schools.com › REACT › DEFAULT.ASP
React Tutorial
Our "Show React" tool makes it easy to demonstrate React. It shows both the code and the result.
🌐
W3Schools
w3schools.com › react › react_getstarted.asp
React Getting Started
React ES6 ES6 Classes ES6 Arrow Functions ES6 Variables ES6 Array map() ES6 Destructuring ES6 Spread Operator ES6 Modules ES6 Ternary Operator ES6 Template Strings React JSX Intro React JSX Expressions React JSX Attributes React JSX If Statements React Components React Class React Props React Props Destructuring React Props Children React Events React Conditionals React Lists React Forms React Forms Submit React Textarea React Select React Multiple Inputs React Checkbox React Radio React Portals React Suspense React CSS Styling React CSS Modules React CSS-in-JS React Router React Transitions React Forward Ref React HOC React Sass
🌐
React
legacy.reactjs.org › docs › codebase-overview.html
Codebase Overview – React
It is used both by React DOM and React Native components. The code for React core is located in packages/react in the source tree. It is available on npm as the react package.
🌐
Codecademy
codecademy.com › learn › react-101
Learn React | Codecademy
Learn React in our course for front-end web development. Create interactive user interfaces and dynamic web apps.
Rating: 4.4 ​ - ​ 3.17K votes
🌐
freeCodeCamp
freecodecamp.org › news › tag › react
React - freeCodeCamp.org
#React · #React · #React · #Jest · #projects · #handbook · #React · #React · #Form validations · #components · #React · #React · #DOM · #components · #Go Language · #React · #React · #React · #React · #React · #events · ##chatbots · #devtools · #React ·
🌐
React Native
reactnative.dev
React Native · Learn once, write anywhere
Written in JavaScript, rendered with native code. React primitives render to native platform UI, meaning your app uses the same native platform APIs other apps do.
🌐
freeCodeCamp
freecodecamp.org › news › best-practices-for-react
React Best Practices – Tips for Writing Better React Code
October 4, 2024 - First and foremost, you'll get to know the three major challenges every React developer has to face. This is important because when you are aware of potential challenges, you'll understand the reasons behind these best practices in a deeper way. Having this mindset from the beginning also helps you when designing your components or organizing your project. After that first important step, I'll introduce you to the three best practices. They're a mixture of theoretical and practical tips with code examples.
🌐
React Resources
reactresources.com
React Resources
If you want to learn how to build efficient React applications, this is your book. Ideal for web developers and software engineers who understand how JavaScript, CSS, and HTML work in the browser, this updated edition provides best practices and patterns for writing modern React code.