Frameworks Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Frameworks flashcards as text
What is the role of `forwardRef` in React?
Answer: Allows a parent component to access a child component's DOM node or instance via a ref
forwardRef lets a component pass a ref it receives down to a DOM element or another component, enabling parent components to interact with child DOM nodes.
In Vue 3, what is the key difference between `ref()` and `reactive()`?
Answer: ref() wraps any value and accesses it via .value; reactive() makes a plain object deeply reactive
ref() wraps any value type and requires .value access in JavaScript, while reactive() takes a plain object and makes all its properties reactive without .value.
What is Angular's change detection strategy `OnPush` used for?
Answer: Limits change detection to run only when input references change or events fire within the component
OnPush tells Angular to skip change detection for a component subtree unless an input reference changes, an event originates within it, or it's manually marked for check.
Which Express.js method correctly handles errors passed via `next(err)`?
Answer: An error-handling middleware with signature (err, req, res, next)
Express identifies error-handling middleware by its four-parameter signature (err, req, res, next); the extra `err` parameter distinguishes it from regular middleware.
What is hydration in the context of server-side rendered React applications?
Answer: The process of attaching React event listeners to server-rendered HTML already in the DOM
Hydration is when React takes over static HTML rendered by the server, attaches event listeners, and makes the page fully interactive without re-rendering the DOM.
In Django REST Framework, what is a Serializer used for?
Answer: Converting complex data types like querysets to native Python datatypes and validating input
DRF Serializers handle converting Django model instances or querysets to JSON-compatible data and validating incoming request data against defined fields.
What does the `key` prop do when rendering lists in React?
Answer: Helps React identify which items changed, added, or removed for efficient DOM updates
Keys give React a stable identity for each list element, allowing it to reconcile the virtual DOM efficiently and avoid unnecessary re-renders or DOM mutations.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy