PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

React · Theory

What is React?

← All stacks

Theory

1/94

What is React?

React is a JavaScript library for building screens out of small functions called components. You do not start with ‘virtual DOM’. You start with: a function returns what the user should see. Change data, React draws again. Facebook open-sourced it. Teams use it for dashboards, shops, admin panels — anywhere the UI keeps changing without a full page reload.

Think of a shop page. Header, product card, cart button. Each piece is a component. The card does not rewrite the whole HTML file when quantity changes. React re-renders that card. That is why people hire React: interactive UI without refreshing the browser like old PHP pages.

It is not a full framework. There is no official router or HTTP client inside the react package. You add React Router, fetch or axios, maybe Redux later. Angular is the contrast: more batteries included. Say that honestly in a viva. ‘React is a UI library’ scores more than a fake feature list.

How does a file actually run? main.jsx (or main.tsx) calls createRoot on <div id="root"> in index.html, then renders <App />. App returns more components. That tree is your whole screen. If #root is missing, nothing appears — a lab trap, not a React bug.

Let’s take this on the board. function Hello({ name }) { return <h1>Hello {name}</h1>; } then <Hello name="Asha" />. Screen: Hello Asha. Change name to Kabir, screen becomes Hello Kabir. No document.getElementById. No innerHTML. Component + data in. That tiny pair is React.

One-way data: parent passes props down. Child does not silently edit the parent. If the child must ask for a change, it calls a callback the parent passed — onSave, onToggle. Freshers try qty++ on a prop. The screen stays stuck. That is the first real bug you will debug.

Learn in this order so you don’t get lost: JSX → function component → props → useState → lists and keys → useEffect → forms. If you jump to Redux on day two you will only copy snippets. If you can explain a click counter and a parent→child name prop out loud, you are actually learning React.

What is React? — on screen — Hello Asha. One function returns UI. Change name → new UI. That is React.

Diagram
App
   │ props
   ▼
  Hello({ name: "Asha" })
   │
   ▼
  Hello Asha
Exam tip

Say: UI library, component + one prop example. Mention it is not Angular.

Example

// What is React
function Hello({ name }) {
  return <h1>Hello {name}</h1>;
}

export default function App() {
  return <Hello name="Asha" />;
}

What is React? — on screen: Hello Asha. One function returns UI. Change name → new UI. That is React.

Short notes

  • DefReact is a JavaScript UI library. You build screens from small components that return what to show.
  • RuleData in → UI out. Change state or props, React re-renders. You do not patch innerHTML by hand.
  • RememberIt is not a full framework. Router, HTTP, and store are extra packages you add.
  • UseShop UI, dashboards, admin panels — anywhere the page keeps changing without a full reload.
  • TrapCalling React ‘a framework like Angular’, or mutating props to update the parent.
  • ExHello({ name: "Asha" }) → Hello Asha. Change name → new heading. That is the whole idea.
  • LearnJSX → component → props → useState → lists/keys → useEffect → forms. Redux later.
  • NeedNode + a bundler (Vite). JSX does not run in a random .html file without a build step.

Questions

1

What is React in one sentence?

2

Is React a full framework?

3

Show one tiny component on the board.

NextIntroduction to React →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.