What is React

React is a JavaScript library for building user interfaces.

It is mainly use for single-page applications where we can update UI immediately. We can use for mobile app or server side rendering.

React was developed by Jordan Walke, who is a software engineer at Facebook. It is maintained and further developed by Facebook.

Why use React

  • React is Component-Based Architecture
  • It uses a virtual DOM (Document Object Model) to immediately update the UI
  • It introduces JSX, a syntax that allows developers to write HTML-like code within JavaScript
  • It provides performance optimization features
  • It follows a unidirectional data flow pattern
import React from 'react';
import ReactDOM from 'react-dom/client';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

function App() {
  return (
    <div className="App">
      Tech Cordial
    </div>
  );
}