Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: import axios from 'axios'; jest.mock('axios'); axios.get.mockResolvedValue({ data: 'mock data' }); Example code import axios from 'axios'; jest.mock('axios'); axios.get.mockResolvedValue({ data: 'mock data'…
Short answer: React is a JavaScript library for building user interfaces, mainly for single-page applications. It helps developers create reusable UI components, manage state efficiently, and update the UI in a performan…
Short answer: on the server. This allows search engines to crawl the content. Real-world example (ShopNest) ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local U…
Short answer: dependencies can lead to bugs or infinite loops. Real-world example (ShopNest) ShopNest’s cart icon uses useState for count and useEffect to load the cart once on mount. Say this in the interview Define — o…
Short answer: styled based on props or state. 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 intervi…
Short answer: You can import regular CSS files directly into your components. import './App.css'; // Regular CSS file Real-world example (ShopNest) ShopNest’s storefront is React: components for ProductCard, CartDrawer,…
Short answer: assets. It’s highly configurable and can be used for React apps, though tools like CRA automate this. Real-world example (ShopNest) ShopNest’s storefront is React: components for ProductCard, CartDrawer, an…
Short answer: xios.get.mockResolvedValue({ data: 'mock data' }); xios.get.mockResolvedValue({ data: 'mock data' }); xios.get.mockResolvedValue({ data: 'mock data' }); xios.get.mockResolvedValue({ data: 'mock data' }); Re…
Short answer: Library (for testing React components). 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…
Short answer: Use the Profiler tab to measure the render times and identify slow components. Check for unnecessary re-renders and optimize with React.memo or shouldComponentUpdate. Real-world example (ShopNest) ShopNest’…
Short answer: (Don’t call hooks inside loops, conditions, or nested functions.) Real-world example (ShopNest) ShopNest’s cart icon uses useState for count and useEffect to load the cart once on mount. Say this in the int…
Short answer: React is a JavaScript library for building user interfaces, mainly for single-page applications. It helps developers create reusable UI components, manage state efficiently, and update the UI in a performan…
Short answer: import { render } from '@testing-library/react'; import MyComponent from './MyComponent'; test('matches snapshot', () => { const { asFragment } = render(<MyComponent />); expect(asFragment()).toMat…
Short answer: import { render, screen, waitFor } from '@testing-library/react'; import MyComponent from './MyComponent'; test('fetches and displays data', async () => { global.fetch = jest.fn(() => Promise.resolve(…
Short answer: Log the time it takes for certain parts of your app to render and pinpoint slow areas. Real-world example (ShopNest) Heavy product grids memoize row components so typing in the search box does not re-render…
Short answer: (ES6+) and JSX syntax in React. 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 intervi…
Short answer: const server = express(); server.get('*', (req, res) => { const content = ReactDOMServer.renderToString(<App />); res.send(` <html> <head><title>SSR Example</title></head…
Short answer: Example: class ErrorBoundary extends React.Component { constructor(props) { super(props); this.state = { hasError: false }; } static getDerivedStateFromError(error) { return { hasError: true }; // Update st…
Short answer: wait waitFor(() => screen.getByText('Data loaded')); expect(screen.getByText('Data loaded')).toBeInTheDocument(); }); Here, we mock the fetch function to return mock data, then test whether it appears in…
Short answer: update only the items that have changed. update only the items that have changed. Real-world example (ShopNest) When rendering cart lines, use a stable key={item.id} —not the array index—so React updates th…
Short answer: A 90-day notice is not bad for your career—it is common in Indian IT services. What hurts growth is unplanned exits, burning bridges, or long gaps while serving notice without upskilling. Product companies…
Short answer: Resign in person or video call to your manager first, then submit formal email to HR the same day. Stay positive, give adequate notice, and focus on handover—not grievances. Professional exits protect refer…
Short answer: Keep it short: intent to resign, last working day per policy, gratitude, and offer to support handover. Do not include reasons for leaving, complaints, or new employer name unless required. Step-by-step app…
Short answer: If your contract specifies notice and you resign voluntarily, the employer can require you to serve it or pay buyout if allowed. They generally cannot force unpaid labor beyond contract, but absconding trig…
Short answer: Leaving without notice (absconding) usually triggers salary forfeiture, negative or delayed experience letter, recovery notices, and failed background checks. Some employers mark “not eligible for rehire.”…
React.js React.js Tutorial · React
Short answer: import axios from 'axios'; jest.mock('axios'); axios.get.mockResolvedValue({ data: 'mock data' });
import axios from 'axios'; jest.mock('axios'); axios.get.mockResolvedValue({ data: 'mock data' });
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: React is a JavaScript library for building user interfaces, mainly for single-page applications. It helps developers create reusable UI components, manage state efficiently, and update the UI in a performant way. ✅ Why use React? Easy to break UIs into components Efficient updates with Virtual DOM Rich ecosystem (React Router, Redux, etc.) Backed by Facebook and a large community
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: on the server. This allows search engines to crawl the content.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: dependencies can lead to bugs or infinite loops.
ShopNest’s cart icon uses useState for count and useEffect to load the cart once on mount.
React.js React.js Tutorial · React
Short answer: styled based on props or state.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: You can import regular CSS files directly into your components. import './App.css'; // Regular CSS file
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: assets. It’s highly configurable and can be used for React apps, though tools like CRA automate this.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: xios.get.mockResolvedValue({ data: 'mock data' }); xios.get.mockResolvedValue({ data: 'mock data' }); xios.get.mockResolvedValue({ data: 'mock data' }); xios.get.mockResolvedValue({ data: 'mock data' });
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: Library (for testing React components).
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: Use the Profiler tab to measure the render times and identify slow components. Check for unnecessary re-renders and optimize with React.memo or shouldComponentUpdate.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: (Don’t call hooks inside loops, conditions, or nested functions.)
ShopNest’s cart icon uses useState for count and useEffect to load the cart once on mount.
React.js React.js Tutorial · React
Short answer: React is a JavaScript library for building user interfaces, mainly for single-page applications. It helps developers create reusable UI components, manage state efficiently, and update the UI in a performant way. ✅ Why use React? Easy to break UIs into components Efficient updates with Virtual DOM Rich ecosystem (React Router, Redux, etc.) Backed by Facebook and a large community
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: import { render } from '@testing-library/react'; import MyComponent from './MyComponent'; test('matches snapshot', () => { const { asFragment } = render(<MyComponent />); expect(asFragment()).toMatchSnapshot(); }); asFragment() captures the rendered output as a DOM snapshot.
toMatchSnapshot() compares the output to a previously saved snapshot. The first time the test is run, it saves the output to a snapshot file. On subsequent runs, it compares the output to the saved snapshot. If there are any changes, the test will fail. Advanced React Concepts
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: import { render, screen, waitFor } from '@testing-library/react'; import MyComponent from './MyComponent'; test('fetches and displays data', async () => { global.fetch = jest.fn(() => Promise.resolve({ json: () => Promise.resolve({ message: 'Data loaded' }), }) ); render(<MyComponent />); await waitFor(() => screen.getByText('Data loaded')); expect(screen.getByText('Data loaded')).toBeInTheDocument(); }); Here, we…
mock the fetch function to return mock data, then test whether it appears in the component.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: Log the time it takes for certain parts of your app to render and pinpoint slow areas.
Heavy product grids memoize row components so typing in the search box does not re-render every image card unnecessarily.
React.js React.js Tutorial · React
Short answer: (ES6+) and JSX syntax in React.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: const server = express(); server.get('*', (req, res) => { const content = ReactDOMServer.renderToString(<App />); res.send(` <html> <head><title>SSR Example</title></head> <body> <div id="root">${content}</div> </body> </html> `); }); server.listen(3000, () => console.log('Server running on In this setup, React renders the app to HTML on the server, then the client "hydrates" it for interactivity.
and making it interactive. Example with express and React: const express = require('express');
const React = require('react');
const ReactDOMServer = require('react-dom/server');
const App = require('./App');
When rendering cart lines, use a stable key={item.id}—not the array index—so React updates the right row after delete.
React.js React.js Tutorial · React
Short answer: Example: class ErrorBoundary extends React.Component { constructor(props) { super(props); this.state = { hasError: false }; } static getDerivedStateFromError(error) { return { hasError: true }; // Update state to trigger a fallback UI } componentDidCatch(error, info) { console.error("Error caught by Error Boundary:", error, info); } render() { if (this.state.hasError) { return <h1>Something went wrong!</h1>; }…
return this.props.children; } } export default ErrorBoundary; You can wrap parts of your app in this ErrorBoundary to gracefully handle errors.
Example: class ErrorBoundary extends React.Component { constructor(props) { super(props); this.state = { hasError: false };
} static getDerivedStateFromError(error) { return { hasError: true }; // Update state to trigger a fallback UI } componentDidCatch(error, info) { console.error("Error caught by Error Boundary:", error, info); } render() { if (this.state.hasError) {
return <h1>Something went wrong!</h1>;
}
return this.props.children;
}
} export default ErrorBoundary; You can wrap parts of your app in this ErrorBoundary to gracefully handle errors.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: wait waitFor(() => screen.getByText('Data loaded')); expect(screen.getByText('Data loaded')).toBeInTheDocument(); }); Here, we mock the fetch function to return mock data, then test whether it appears in the component.
wait waitFor(() => screen.getByText('Data loaded')); expect(screen.getByText('Data loaded')).toBeInTheDocument(); }); Here, we mock the fetch function to return mock data, then test whether it appears in the component. wait waitFor(() => screen.getByText('Data loaded')); expect(screen.getByText('Data loaded')).toBeInTheDocument(); }); Here, we mock the fetch function to return mock data, then test whether it appears in the component.
ShopNest’s storefront is React: components for ProductCard, CartDrawer, and CheckoutForm, with hooks for local UI state.
React.js React.js Tutorial · React
Short answer: update only the items that have changed. update only the items that have changed.
When rendering cart lines, use a stable key={item.id}—not the array index—so React updates the right row after delete.
Notice Period Career & HR Interview Guide · Notice Period
Short answer: A 90-day notice is not bad for your career—it is common in Indian IT services. What hurts growth is unplanned exits, burning bridges, or long gaps while serving notice without upskilling. Product companies know service-sector notice norms.
Recruiters ask about notice on the first call. Transparency + early release plan beats hiding your situation.
Ananya served full 90 days at Cognizant but used evenings for Azure certification and mock interviews. She joined Zoho with a clear story: “I honored commitment, automated handover, and upskilled.” Interviewers valued reliability over speed.
Growth comes from skills and outcomes, not notice length alone—use the window deliberately.
Notice Period Career & HR Interview Guide · Notice Period
Short answer: Resign in person or video call to your manager first, then submit formal email to HR the same day. Stay positive, give adequate notice, and focus on handover—not grievances. Professional exits protect references and future background checks.
Neha met her manager on Monday morning, explained she accepted a product role, and shared a 2-week handover outline. She submitted HR resignation by noon, completed exit checklist, and received a positive experience letter mentioning “professional conduct during transition.”
You can be firm and kind: “This was a hard decision; I want to make the transition smooth for the team.”
Notice Period Career & HR Interview Guide · Notice Period
Short answer: Keep it short: intent to resign, last working day per policy, gratitude, and offer to support handover. Do not include reasons for leaving, complaints, or new employer name unless required.
Arjun sent a 6-line email after a manager call. HR accepted immediately; no back-and-forth because dates matched policy and tone was neutral. His F&F processed on time.
Subject: Resignation — [Your Full Name] — [Employee ID] Dear [Manager Name] and HR Team, Please accept this email as formal notice of my resignation from the position of [Job Title], effective [Resignation Date]. As per my employment terms, my notice period is [X days/weeks], and my expected last working day is [LWD], subject to company policy and handover completion. I am grateful for the opportunities here and will do my best to ensure a smooth transition, including documentation and knowledge transfer. Please advise on exit formalities and asset return. Sincerely, [Full Name] [Employee ID] [Phone]
Save a PDF copy—needed for visa, loans, and future verification.
Notice Period Career & HR Interview Guide · Notice Period
Short answer: If your contract specifies notice and you resign voluntarily, the employer can require you to serve it or pay buyout if allowed. They generally cannot force unpaid labor beyond contract, but absconding triggers recovery clauses and legal risk.
Indian employment law is contract-driven. IT industry norms are strong but not above written terms.
A developer’s manager refused early release despite empty backlog. HR cited policy: full 60 days or buyout. He chose buyout funded by new employer rather than absconding—avoided blacklist on background verification vendors used by top product firms.
If stuck, serve professionally—your reputation outlasts one long notice.
Notice Period Career & HR Interview Guide · Notice Period
Short answer: Leaving without notice (absconding) usually triggers salary forfeiture, negative or delayed experience letter, recovery notices, and failed background checks. Some employers mark “not eligible for rehire.” New employers may revoke offers if verification fails.
Karthik absconded from a service firm after 20 days of 90-day notice to join a startup. BGV failed; startup withdrew offer. He paid settlement after 6 months, got experience letter, and re-applied—lost a year of seniority progression. Buyout would have cost less than career damage.
Almost always cheaper and safer to negotiate buyout or serve partial notice than to abscond.