What is a controlled component versus an uncontrolled component?
Simple meaning
A controlled input takes its value from React state and updates through onChange.
Open the full page for Why, Steps, Example and Key takeaway.
Panel-ready MERN Full Stack questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.
A controlled input takes its value from React state and updates through onChange.
Open the full page for Why, Steps, Example and Key takeaway.
React.memo skips re-rendering a component when its props are shallowly equal.
Open the full page for Why, Steps, Example and Key takeaway.
Trigger the request in useEffect or a data library such as React Query, handle loading and error states, and cancel or ignore stale responses.
Open the full page for Why, Steps, Example and Key takeaway.
Lift state when two nearby components share data.
Open the full page for Why, Steps, Example and Key takeaway.
A custom hook is a function starting with use that calls other hooks.
Open the full page for Why, Steps, Example and Key takeaway.
An access token is short-lived and sent on each API call.
Open the full page for Why, Steps, Example and Key takeaway.
SameSite=Lax or Strict stops the browser from sending cookies on most cross-site requests, which blocks classic CSRF.
Open the full page for Why, Steps, Example and Key takeaway.
A salt is random data mixed into the hash so two users with the same password get different hashes.
Open the full page for Why, Steps, Example and Key takeaway.
A middleware reads the cookie or Authorization header, verifies the JWT or session, and attaches req.user.
Open the full page for Why, Steps, Example and Key takeaway.
OAuth lets the user sign in with a provider such as Google without sharing their password with you.
Open the full page for Why, Steps, Example and Key takeaway.
The user requests a reset
Open the full page for Why, Steps, Example and Key takeaway.
A Dockerfile packages Node, dependencies, and start command so the app runs the same on every machine.
Open the full page for Why, Steps, Example and Key takeaway.
Platforms such as Render, Railway, or AWS inject env vars into the process at runtime.
Open the full page for Why, Steps, Example and Key takeaway.
A reverse proxy such as nginx receives public traffic and forwards it to Express.
Open the full page for Why, Steps, Example and Key takeaway.
A process manager can start a new worker, wait until it listens, then stop the old one.
Open the full page for Why, Steps, Example and Key takeaway.
Atlas rejects connections from IPs that are not on the allowlist.
Open the full page for Why, Steps, Example and Key takeaway.
Query the UI the way a user would, by role, label, and text, not by component internals.
Open the full page for Why, Steps, Example and Key takeaway.
Replace the network layer with a stub that returns canned JSON so tests stay fast and offline.
Open the full page for Why, Steps, Example and Key takeaway.
Supertest issues HTTP requests against your Express app without opening a real port.
Open the full page for Why, Steps, Example and Key takeaway.
A stub returns prepared data so the unit under test can run.
Open the full page for Why, Steps, Example and Key takeaway.