Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 26–48 of 48

Popular tracks

Junior PDF
What is code splitting and how do you implement it?

Short answer: Code splitting is the practice of breaking up the bundle into smaller chunks so that only the required code is loaded when needed, improving initial load performance. How to Implement: Real-world example (S…

React Read answer
Junior PDF
What is lazy loading in React?

Short answer: Lazy loading is a design pattern where resources (like components) are loaded only when they are needed (e.g., when they enter the viewport or the user navigates to the route). In React, lazy loading is typ…

React Read answer
Junior PDF
What is Jest and how is it used with React?

Short answer: Jest is a JavaScript testing framework created by Facebook, commonly used for testing React applications. It comes with: Test runner: Executes test files. Assertions: Provides functions like expect() for as…

React Read answer
Junior PDF
What is React Testing Library and how does it differ from Enzyme?

Short answer: React Testing Library (RTL) and Enzyme are two popular testing utilities for React. Explain a bit more Feature React Testing Library Enzyme Philosophy Tests behavior from the user's perspective Tests compon…

React Read answer
Junior PDF
What is React Testing Library and how does it differ from Enzyme?

Short answer: ccessibility Shallow rendering, component state, and props Testing Approach Encourages testing DOM behavior and accessibility Encourages testing component internals and methods Integration with React Built…

React Read answer
Junior PDF
What is snapshot testing?

Short answer: Snapshot testing is a way of testing a component’s rendered output by saving it to a snapshot file and comparing it with future renders. This helps detect any unintended changes in the UI. How to write snap…

React Read answer
Junior PDF
What is the render props pattern?

Short answer: The render props pattern is a technique for sharing code between components using a prop whose value is a function (a “render prop”). This function can return JSX or other values, allowing more dynamic beha…

React Read answer
Junior PDF
What is the render props pattern?

Short answer: llowing more dynamic behavior and custom rendering. Explain a bit more Purpose: It enables a component to expose its logic while letting its consumers define how the output is rendered. Real-world example (…

React Read answer
Junior PDF
What is reconciliation in React?

Short answer: Reconciliation is the process by which React updates the DOM efficiently when a component's state or props change. Explain a bit more React uses a virtual DOM to compare the new virtual DOM tree with the pr…

React Read answer
Junior PDF
What is React Fiber?

Short answer: React Fiber is a complete rewrite of React's reconciliation algorithm. Explain a bit more It is designed to improve the rendering performance and make React more responsive and capable of handling asynchron…

React Read answer
Junior PDF
What is static site generation (SSG) in React frameworks like Next.js?

Short answer: Static Site Generation (SSG) is a technique where HTML pages are generated at build time. Unlike SSR, SSG pre-renders all pages during the build process, which results in faster load times. Example with Nex…

React Read answer
Junior PDF
What is hydration in React SSR?

Short answer: Hydration refers to the process where React takes over the static HTML rendered by the server and attaches event listeners and restores interactivity. Explain a bit more This happens once the JavaScript bun…

React Read answer
Junior PDF
What is Next.js and why use it?

Short answer: Next.js is a React framework that enables server-side rendering (SSR), static site generation (SSG), API routes, and more out-of-the-box. Explain a bit more It simplifies React app development by providing…

React Read answer
Junior PDF
What is Next.js and why use it?

Short answer: And developer experience. Why use Next.js? Server-Side Rendering (SSR): Automatically generates HTML on the server for better SEO and faster initial load. Static Site Generation (SSG): Pre-renders pages at…

React Read answer
Junior PDF
What is Create React App?

Short answer: Create React App (CRA) is a boilerplate tool to set up a modern React app without configuring build tools like Webpack, Babel, etc. Explain a bit more It’s designed to help you focus on writing code instead…

React Read answer
Junior PDF
What is PropTypes in React?

Short answer: PropTypes is a runtime type-checking library used to validate the types of props passed to React components. It helps catch errors during development by ensuring that props match the expected data types. Ex…

React Read answer
Junior PDF
What is PropTypes in React?

Short answer: ge: PropTypes.number.isRequired, }; In this example, PropTypes.string.isRequired ensures that the name prop is a string nd is required. If it’s not passed or is of the wrong type, React will display a warni…

React Read answer
Junior PDF
What is React Native and how does it differ from React?

Short answer: React Native is a framework for building native mobile applications (iOS and Android) using React and JavaScript. Explain a bit more While React is for web development, React Native allows you to create mob…

React Read answer
Junior PDF
What is reconciliation and why is it important?

Short answer: Reconciliation is the process React uses to update the UI efficiently when state or props change. Explain a bit more React compares the old virtual DOM with the new virtual DOM and calculates the minimal se…

React Read answer
Junior PDF
What is the difference between React and Angular or Vue?

Short answer: React: Library for building UI, focusing on components and rendering. Explain a bit more Declarative and flexible: Use JavaScript to write components. React has a rich ecosystem, but you often need addition…

React Read answer
Junior PDF
What is the difference between React and Angular or Vue?

Short answer: ngular: Framework: Full-fledged framework for building web apps. Uses TypeScript by default and has built-in solutions for routing, HTTP requests, form handling, and more. Real-world example (ShopNest) Shop…

React Read answer
Junior PDF
What is the role of JSX transpilation?

Short answer: JSX transpilation refers to the process of converting JSX syntax (JavaScript XML) into regular JavaScript. Since browsers don't understand JSX directly, tools like Babel transpile JSX into valid JavaScript…

React Read answer
Junior PDF
What is concurrent mode in React?

Short answer: Concurrent Mode is an experimental feature in React that enables the rendering process to be interruptible. It allows React to work on multiple tasks at once, making apps feel more responsive by prioritizin…

React Read answer

React.js React.js Tutorial · React

Short answer: Code splitting is the practice of breaking up the bundle into smaller chunks so that only the required code is loaded when needed, improving initial load performance. How to Implement:

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Lazy loading is a design pattern where resources (like components) are loaded only when they are needed (e.g., when they enter the viewport or the user navigates to the route). In React, lazy loading is typically implemented using React.lazy and Suspense.

Example code

import { Suspense } from 'react'; const HeavyComponent = React.lazy(() => import('./HeavyComponent')); function App() { return ( <Suspense fallback={<div>Loading...</div>}> <HeavyComponent /> </Suspense> ); } This ensures that the heavy component is only loaded when the app actually needs it.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Jest is a JavaScript testing framework created by Facebook, commonly used for testing React applications. It comes with: Test runner: Executes test files. Assertions: Provides functions like expect() for asserting conditions. Mocks: Mocking capabilities for API calls or functions. Snapshots: Captures UI output at a given time. How to use Jest with React: Install Jest: npm install --save-dev jest

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: React Testing Library (RTL) and Enzyme are two popular testing utilities for React.

Explain a bit more

Feature React Testing Library Enzyme Philosophy Tests behavior from the user's perspective Tests component internals and implementation Test Focus Interaction, rendering, and accessibility Shallow rendering, component state, and props Testing Approach Encourages testing DOM behavior and accessibility Encourages testing component internals and methods Integration with React Built with React’s rendering behavior in mind Requires enzyme adapter for different React versions Recommendation More modern, encourages better testing practices Still used, but React Testing Library is more popular Key difference: React Testing Library focuses on testing the output of your components (UI behavior), similar to how a user interacts with the app. Enzyme focuses more on testing the internal implementation (component state, methods).

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: ccessibility Shallow rendering, component state, and props Testing Approach Encourages testing DOM behavior and accessibility Encourages testing component internals and methods Integration with React Built with React’s rendering behavior in mind Requires enzyme adapter for different React versions Recommendation More modern,… encourages better testing…… practices Still used, but React Testing Library is more popular…

Explain a bit more

Key difference: React Testing Library focuses on testing the output of your components (UI behavior), similar to how a user interacts with the app. Enzyme focuses more on testing the internal implementation (component state, methods).

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Snapshot testing is a way of testing a component’s rendered output by saving it to a snapshot file and comparing it with future renders. This helps detect any unintended changes in the UI. How to write snapshot tests: Run Jest with snapshot testing: npm test -- --updateSnapshot

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: The render props pattern is a technique for sharing code between components using a prop whose value is a function (a “render prop”). This function can return JSX or other values, allowing more dynamic behavior and custom rendering. Purpose: It enables a component to expose its logic while letting its consumers define how the output is rendered.

Example code

class MouseTracker extends React.Component { state = { x: 0, y: 0 }; handleMouseMove = (event) => { this.setState({ x: event.clientX, y: event.clientY, }); }; render() { return ( <div onMouseMove={this.handleMouseMove}> {this.props.render(this.state)} </div> ); } } const App = () => ( <MouseTracker render={({ x, y }) => ( <h1>The mouse position is ({x}, {y})</h1> )} /> ); In this example, MouseTracker uses the render prop pattern to allow the parent component to decide how to render the mouse position data.

Real-world example (ShopNest)

ProductCard receives price via props. The parent Catalog owns selected filters in state and passes them down.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: llowing more dynamic behavior and custom rendering.

Explain a bit more

Purpose: It enables a component to expose its logic while letting its consumers define how the output is rendered.

Real-world example (ShopNest)

ProductCard receives price via props. The parent Catalog owns selected filters in state and passes them down.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Reconciliation is the process by which React updates the DOM efficiently when a component's state or props change.

Explain a bit more

React uses a virtual DOM to compare the new virtual DOM tree with the previous one and determines the minimal set of changes required to update the actual DOM. Key Concepts: Virtual DOM: A lightweight representation of the real DOM. Diffing algorithm: React’s algorithm compares the old and new virtual DOMs to find the differences (diffs) and apply the smallest set of changes. Reconciliation Flow:

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: React Fiber is a complete rewrite of React's reconciliation algorithm.

Explain a bit more

It is designed to improve the rendering performance and make React more responsive and capable of handling asynchronous rendering. Key Features: Incremental Rendering: React Fiber allows rendering to be split into chunks, so it can pause and resume work, improving responsiveness. Prioritization: React can assign different priority levels to updates (e.g., user input vs. background updates). Async Rendering: Enables non-blocking UI updates, making React apps feel more responsive.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Static Site Generation (SSG) is a technique where HTML pages are generated at build time. Unlike SSR, SSG pre-renders all pages during the build process, which results in faster load times. Example with Next.js (SSG): import React from 'react'; export async function getStaticProps() { const data = await fetchDataFromAPI();

Example code

return { props: { data } };
} function Page({ data }) { return <div>{data}</div>;
} export default Page; Here, getStaticProps is a Next.js function that fetches data during build time. The page is pre-rendered and served as static HTML.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Hydration refers to the process where React takes over the static HTML rendered by the server and attaches event listeners and restores interactivity.

Explain a bit more

This happens once the JavaScript bundle is loaded on the client. SSR: Server renders the HTML. Hydration: React "hydrates" the server-rendered HTML to make it interactive. This process allows the page to load quickly (thanks to the server-rendered HTML) and then become fully interactive once React takes over. React Ecosystem & Tools

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Next.js is a React framework that enables server-side rendering (SSR), static site generation (SSG), API routes, and more out-of-the-box.

Explain a bit more

It simplifies React app development by providing a set of conventions and features that improve performance, SEO, and developer experience. Why use Next.js? Server-Side Rendering (SSR): Automatically generates HTML on the server for better SEO and faster initial load. Static Site Generation (SSG): Pre-renders pages at build time, improving performance. Automatic Code Splitting: Only loads the necessary JavaScript for the current page. File-Based Routing: Routing is based on the file system, making navigation easier. API Routes: Allows you to build API endpoints directly inside your Next.js app. Image Optimization: Automatically optimizes images for better performance. Example: npx create-next-app my-next-app In this setup, the app can be SSR or SSG-enabled, providing better performance and SEO out of the box.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: And developer experience. Why use Next.js? Server-Side Rendering (SSR): Automatically generates HTML on the server for better SEO and faster initial load. Static Site Generation (SSG): Pre-renders pages at build time, improving performance. Automatic Code Splitting: Only loads the necessary JavaScript for the current page. File-Based Routing:… Routing is……… based on the file system, making navigation easier.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Create React App (CRA) is a boilerplate tool to set up a modern React app without configuring build tools like Webpack, Babel, etc.

Explain a bit more

It’s designed to help you focus on writing code instead of spending time configuring tools. Features: Zero Configuration: It sets up Webpack, Babel, ESLint, and other essential tools. Development Server: Provides a development server with hot reloading. Production Build: Automates production optimizations like minification, asset optimization, etc. How to Use CRA: npx create-react-app my-app cd my-app npm start With CRA, you don’t have to manually configure Webpack or Babel. It gives you everything you need to start building React applications right away.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: PropTypes is a runtime type-checking library used to validate the types of props passed to React components. It helps catch errors during development by ensuring that props match the expected data types.

Example code

import PropTypes from 'prop-types'; function MyComponent({ name, age }) { return <div>{name} is {age} years old</div>; } MyComponent.propTypes = { name: PropTypes.string.isRequired, age: PropTypes.number.isRequired, }; In this example, PropTypes.string.isRequired ensures that the name prop is a string and is required. If it’s not passed or is of the wrong type, React will display a warning in the console.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: ge: PropTypes.number.isRequired, }; In this example, PropTypes.string.isRequired ensures that the name prop is a string nd is required. If it’s not passed or is of the wrong type, React will display a warning in the console.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: React Native is a framework for building native mobile applications (iOS and Android) using React and JavaScript.

Explain a bit more

While React is for web development, React Native allows you to create mobile apps with a similar paradigm but using native components (e.g., <View> instead of <div>). Key Differences: React: Builds for the web, rendering HTML and managing DOM. React Native: Builds for mobile, using native components and APIs for interaction with mobile devices (camera, geolocation, etc.). Example in React Native: import { Text, View } from 'react-native'; function App() { return ( <View> <Text>Hello, React Native!</Text> </View> ); } In React Native, the components map to native UI elements, such as <Text> for text, <View> for containers, and <Button> for buttons.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Reconciliation is the process React uses to update the UI efficiently when state or props change.

Explain a bit more

React compares the old virtual DOM with the new virtual DOM and calculates the minimal set of changes required to update the real DOM. This makes React apps fast and efficient. Why important: It helps React determine the minimal updates needed, avoiding unnecessary re-renders. React uses a diffing algorithm to compare previous and current states to optimize DOM updates.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: React: Library for building UI, focusing on components and rendering.

Explain a bit more

Declarative and flexible: Use JavaScript to write components. React has a rich ecosystem, but you often need additional libraries for routing, state management, etc. Angular: Framework: Full-fledged framework for building web apps. Uses TypeScript by default and has built-in solutions for routing, HTTP requests, form handling, and more. Two-way data binding: Automatically synchronizes model and view. Vue: Framework: Similar to React, but provides two-way binding and template syntax. Easier to integrate into existing projects. Flexibility: Offers the reactivity model and simplicity in syntax.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: ngular: Framework: Full-fledged framework for building web apps. Uses TypeScript by default and has built-in solutions for routing, HTTP requests, form handling, and more.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: JSX transpilation refers to the process of converting JSX syntax (JavaScript XML) into regular JavaScript. Since browsers don't understand JSX directly, tools like Babel transpile JSX into valid JavaScript that browsers can execute.

Example code

const element = <h1>Hello, world!</h1>; Babel transpiles the JSX into: const element = React.createElement('h1', null, 'Hello, world!');

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

React.js React.js Tutorial · React

Short answer: Concurrent Mode is an experimental feature in React that enables the rendering process to be interruptible. It allows React to work on multiple tasks at once, making apps feel more responsive by prioritizing higher-priority updates (like animations or user input) over lower-priority ones.

Real-world example (ShopNest)

ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details