MERN Stack Last-Minute Revision
Quickly revise the questions you picked. Add questions from the interview-questions lists with Save to → Last-Minute Revision.
30 quick revision notes for MERN Stack
- let and const are block-scoped and in the temporal dead zone before declaration, while var is function-scoped and hoisted as undefined.
- A closure is a function that remembers variables from the scope where it was created, even after the outer function returns.
- The event loop drains all microtasks such as Promise callbacks before running the next macrotask such as a setTimeout callback.
- Arrow functions do not have their own this or arguments and cannot be used as constructors with new.
- Promise.all rejects on the first failure, while Promise.allSettled waits for every Promise and reports each status.
- Node.js runs JavaScript on one thread but uses libuv and the OS for non-blocking I/O, so CPU-heavy work blocks it.
- The libuv thread pool has four threads by default and handles file system, DNS lookup, zlib and some crypto operations.
- Streams process data in chunks with backpressure; use pipeline to connect them and handle errors and cleanup safely.
- Use worker_threads for CPU-heavy tasks and cluster or PM2 cluster mode to use all CPU cores for an HTTP server.
- Express middleware runs in registration order, and error-handling middleware has four parameters and must be registered last.
- Express 5 automatically forwards rejected Promises from async route handlers to the error-handling middleware.
- Use 201 for created resources, 400 for bad input, 401 for unauthenticated, 403 for forbidden and 409 for conflicts.
- CORS is enforced by browsers; with cookies the server must allow a specific origin and set credentials to true.
- Cursor pagination using an indexed field like _id stays fast and consistent on large collections, unlike skip and limit.
- Embed data that is read together and bounded in size; reference data that grows without limit or is shared widely.
- Order compound index fields by the ESR rule: equality fields first, then sort fields, then range fields.
- Use explain with executionStats to check for COLLSCAN and compare documents examined with documents returned.
- Multi-document transactions in MongoDB need a replica set or sharded cluster, and single-document writes are always atomic.
- Mongoose lean returns plain JavaScript objects, which is faster and lighter for read-only API responses.
- A unique index, not an application-level check, is the reliable way to prevent duplicate emails under concurrent requests.
- Keys in React lists must be stable and unique so React keeps the correct DOM nodes and component state between renders.
- The useEffect cleanup function runs before the next effect and on unmount, and should remove listeners, timers and requests.
- useMemo caches a computed value and useCallback caches a function reference, both based on a dependency array.
- A stale closure happens when a callback captures an old state value; functional updates or refs usually fix it.
- Context is good for low-frequency global data like theme and user, but frequent updates re-render every consumer.
- React Testing Library encourages querying elements by role, label or text and testing behaviour the user can see.
- Store passwords as bcrypt or Argon2 hashes with a per-password salt; never store plain text or fast hashes like MD5.
- Keep access tokens short-lived and refresh tokens in httpOnly, Secure, SameSite cookies that can be revoked on the server.
- Only Vite variables prefixed with VITE_ reach the browser bundle, and anything in the bundle is public, so never put secrets there.
- For React Router on a server, configure a fallback to index.html so refreshing a deep link does not return 404.
Night-before checklist
- Revise your saved questions on this page once, aloud.
- Read the quick notes and mark any you cannot explain in one line.
- Rehearse a two-minute self-introduction and two project stories.
- Keep CV, ID, laptop charger and interview link ready; sleep on time.
Frequently asked questions
How does Last-Minute Revision work?
On any question page, open Save to → Last-Minute Revision. Saved questions appear here with their answers, so the night before an interview you revise only what you found hard.
Is my list saved?
Yes, in this browser. Guests can save 5 questions; free accounts can save 20 for revision and 100 for the 7-day plan.
What should I revise last before a MERN Stack interview?
Your saved misses first, then the quick notes on this page, then one or two project stories. Avoid learning brand-new topics the night before.
Find questions to save
Company-wise MERN Stack questionsExperience-wise MERN Stack questionsRole-wise MERN Stack questionsCity-wise MERN Stack questionsMost asked MERN Stack questionsScenario-based questionsPractical / hands-on questionsHR & behavioural questionsMERN Stack mock interviewOnline assessment questionsTechnical round questionsManagerial round questionsMERN Stack topic sheets