Module 01 · Fundamentals
Module 01 · Questions 1–4

React Fundamentals

The warm-up questions. They sound easy, but a weak answer here sets the tone for the whole interview. Aim to sound precise, not textbook.

Q1

What is React?

In one line

React is a JavaScript library for building user interfaces out of reusable components, created by Meta.

The four ideas that actually define it:

IdeaWhat it means
Component-basedThe UI is split into small independent pieces you compose together, like Lego.
DeclarativeYou describe what the screen should look like for a given state. React works out how to update the DOM.
Virtual DOMReact keeps a copy of the UI in memory, compares it after a change, and touches only the parts of the real DOM that differ.
One-way data flowData flows down from parent to child. That makes bugs easy to trace.

Declarative vs imperative — the difference in code

// Imperative (plain JS): you give step-by-step instructions
const btn = document.getElementById("btn");
btn.addEventListener("click", () => {
  document.getElementById("label").innerText = "Clicked!";   // you touch the DOM yourself
});

// Declarative (React): you describe the result
{clicked ? "Clicked!" : "Not clicked"}                       // React updates the DOM for you
30-second interview answer

React is a JavaScript library from Meta for building user interfaces. You build the UI from small reusable components and describe what each should look like for a given state; React then uses a Virtual DOM to work out the minimum real DOM updates needed. Data flows one way, from parent to child, which makes the app predictable. It handles the view layer only — routing, state management and HTTP come from separate libraries.

Q2

Is React a framework or a library?

In one line

A library. React only handles the UI — everything else is your choice.

React deliberately leaves out most of what an application needs:

NeedReact gives youYou add
UI components✅ Yes—
Routing❌ NoReact Router
Global stateContext onlyRedux Toolkit, Zustand
HTTP calls❌ Nofetch, Axios
Forms❌ NoReact Hook Form
Build tooling❌ NoVite
Nuance worth adding

People sometimes call React a framework because of the ecosystem around it, and Next.js genuinely is a framework built on React. But React itself is a library. Saying that distinction out loud shows you understand it rather than reciting it.

30-second interview answer

React is a library — it only covers the view layer. Routing, state management, HTTP and forms all come from separate packages that you choose. That's the trade-off: more flexibility, but the architecture decisions are yours. Next.js, which is built on React, is the framework version of it.

Q3

What is the difference between a library and a framework?

In one line

You call a library. A framework calls you. That reversal is called inversion of control.

LIBRARY FRAMEWORK Your code Framework | | | calls --> library | calls --> your code | | You are in charge It is in charge (React, jQuery, Dapper) (Angular, ASP.NET MVC)

A useful comparison from your own .NET world: Dapper is a library — you write the SQL and call it when you want. ASP.NET MVC is a framework — it owns the request pipeline and calls your controller action at the moment it decides.

LibraryFramework
Who's in controlYouThe framework
StructureYou decidePrescribed
FreedomHighLower, but consistent
ExamplesReact, Dapper, AxiosAngular, ASP.NET Core, Spring
30-second interview answer

The difference is inversion of control. With a library, your code is in charge and calls the library when it needs it. With a framework, the framework is in charge and calls your code at the points it defines. Dapper is a library, ASP.NET Core MVC is a framework — and in the frontend, React is a library while Angular is a framework.

Q4

React vs Angular?

In one line

React is a flexible UI library where you assemble your own stack; Angular is a complete opinionated framework with everything already decided.

ReactAngular
TypeLibrary (UI only)Full framework
LanguageJS or TypeScriptTypeScript (enforced)
TemplatesJSX — markup inside JSHTML templates + directives (*ngIf, *ngFor)
Data bindingOne-wayTwo-way available ([(ngModel)])
DINot built inBuilt-in dependency injection
Routing / HTTPSeparate packagesBuilt in
Async stylePromises / async-awaitRxJS observables
Learning curveGentler startSteeper — more concepts up front
Best forFlexible apps, fast-moving teamsLarge enterprise apps wanting one standard way
How to answer without sounding biased

Never say "React is better". Say what each is good at, then name a situation for each. A senior engineer picks tools for a context; a junior defends a favourite.

30-second interview answer

Angular is a complete framework — TypeScript, dependency injection, routing, HTTP and RxJS all come in the box, with one prescribed way of doing things, which suits large enterprise teams that want consistency. React is a UI library: it gives you components and leaves routing, state and HTTP to you, so you get flexibility and a lighter learning curve but you own the architecture decisions. I'd pick Angular where a large team needs one enforced standard, and React where I want to move fast and shape the stack around the product.