Chuyển tới nội dung chính

Câu hỏi mới đã được thêm!Khám phá ngay

frontendprofrontendpro
Tổng quan
Tất cả câu hỏi luyện tậpFrameworks / ngôn ngữĐịnh dạng câu hỏiTất cả quiz
GIẢM 20%

Hoàn thành nhiệm vụ đơn giản để mở khóa ưu đãi

Xem nhiệm vụ
frontendprofrontendproTổng quan
Đăng nhập
GiáMỚITruy cập đầy đủĐăng nhập
frontendprofrontendpro

Tài liệu Software Engineering

Luyện tập

  • Tất cả câu hỏi
  • Tất cả quiz
  • Tất cả tài liệu

Khám phá

  • Tổng quan
  • Tiết kiệm thời gian
  • Frameworks / ngôn ngữ

Tài khoản

  • Đăng nhập
  • Đăng ký

© 2026 frontendpro. Bảo lưu mọi quyền.

DiscordLinkedInGitHub

Quiz

Mới bắt đầu? Hãy thử các câu quiz dễ.

CodingSystem designQuiz
330quiz660phút ước tính0đã hoàn thành

Which of the following is NOT a JavaScript primitive data type?

JavaScriptData TypesCơ bản4 lựa chọn

Which operator is used to check the data type of a variable in JavaScript?

JavaScriptType CheckingCơ bản4 lựa chọn

What does `typeof null` return?

JavaScriptType CheckingTrung bình4 lựa chọn

How do null, undefined, and an undeclared variable differ?

JavaScriptNull UndefinedTrung bình4 lựa chọn

Which statement about var, let, and const is correct?

JavaScriptVariablesCơ bản4 lựa chọn

Which is true about reassignment and redeclaration?

JavaScriptVariablesTrung bình4 lựa chọn

Why is it a good idea to avoid polluting the global scope?

JavaScriptScopeTrung bình4 lựa chọn

Which is NOT a common way to convert a string to a number in JavaScript?

JavaScriptConversionCơ bản4 lựa chọn

How do you embed an expression inside a template literal?

JavaScriptTemplate LiteralsCơ bản4 lựa chọn

In a tagged template, what does the tag function receive as its first argument?

JavaScriptTagged TemplatesNâng cao4 lựa chọn

What does the spread operator (...) do with an array like [...arr]?

JavaScriptSpreadCơ bản4 lựa chọn

What are Symbols primarily used for?

JavaScriptSymbolsTrung bình4 lựa chọn

Does `Symbol('key') === Symbol('key')` evaluate to true?

JavaScriptSymbolsNâng cao4 lựa chọn

What is a JavaScript Proxy used for?

JavaScriptProxiesTrung bình4 lựa chọn

What is hoisting in JavaScript?

JavaScriptHoistingCơ bản4 lựa chọn

Accessing a `let` variable before its declaration results in:

JavaScriptHoistingTrung bình4 lựa chọn

What value do you get by accessing a `var` variable before its initialization?

JavaScriptHoistingTrung bình4 lựa chọn

Which are hoisted such that they can be called before their definition?

JavaScriptHoistingTrung bình4 lựa chọn

How can you best avoid problems caused by hoisting?

JavaScriptHoistingCơ bản4 lựa chọn

What is the key difference between == and === in JavaScript?

JavaScriptEqualityCơ bản4 lựa chọn

What is a common legitimate use of the loose equality operator ==?

JavaScriptEqualityTrung bình4 lựa chọn

Which loop iterates over an object's enumerable properties, including inherited ones?

JavaScriptIterationTrung bình4 lựa chọn

What is the difference between break and continue?

JavaScriptControl FlowCơ bản4 lựa chọn

What is the syntax of the ternary operator?

JavaScriptOperatorsCơ bản4 lựa chọn

Which array method gives you both the element and its index in the callback?

JavaScriptArraysCơ bản4 lựa chọn

What does the switch statement do when no case matches?

JavaScriptControl FlowCơ bản4 lựa chọn

What do rest parameters (...args) do?

JavaScriptFunctionsCơ bản4 lựa chọn

How do spread and rest syntax differ, despite sharing the ... token?

JavaScriptSpread RestTrung bình4 lựa chọn

What must an iterator object implement?

JavaScriptIterators GeneratorsNâng cao4 lựa chọn

How is a generator function declared?

JavaScriptIterators GeneratorsNâng cao4 lựa chọn

What is the difference between `function foo(){}` and `var foo = function(){}`?

JavaScriptFunctionsTrung bình4 lựa chọn

What is the difference between a parameter and an argument?

JavaScriptFunctionsCơ bản4 lựa chọn

What is a key benefit of arrow functions in callbacks?

JavaScriptFunctionsCơ bản4 lựa chọn

What does `const p = Person()` do if Person is meant to be a constructor?

JavaScriptConstructorsTrung bình4 lựa chọn

What defines a higher-order function?

JavaScriptHigher Order FunctionsTrung bình4 lựa chọn

What is a callback function?

JavaScriptCallbacksCơ bản4 lựa chọn

What is a typical use case for anonymous functions?

JavaScriptAnonymous FunctionsCơ bản4 lựa chọn

What is essential to prevent infinite recursion?

JavaScriptRecursionTrung bình4 lựa chọn

When is a default parameter's value used?

JavaScriptDefault ParametersCơ bản4 lựa chọn

Why does `function foo(){}();` fail as an IIFE, and how do you fix it?

JavaScriptIifeNâng cao4 lựa chọn

Which is NOT a standard way to create an object in JavaScript?

JavaScriptObjectsCơ bản4 lựa chọn

When must you use bracket notation instead of dot notation?

JavaScriptObjectsTrung bình4 lựa chọn

Which array method transforms each element and returns a new array?

JavaScriptArraysCơ bản4 lựa chọn

Which method can add or remove elements at any position in an array?

JavaScriptArraysTrung bình4 lựa chọn

Which produces a shallow copy of an object?

JavaScriptCopyingTrung bình4 lựa chọn

What is the key difference between a shallow copy and a deep copy?

JavaScriptCopyingNâng cao4 lựa chọn

Which modern built-in creates a deep copy of an object?

JavaScriptCopyingTrung bình4 lựa chọn

Which reliably checks for an object's own property (excluding inherited ones)?

JavaScriptObjectsTrung bình4 lựa chọn

What is the difference between mutable and immutable objects?

JavaScriptImmutabilityTrung bình4 lựa chọn

What does destructuring assignment let you do?

JavaScriptDestructuringCơ bản4 lựa chọn

What does Object.freeze() do?

JavaScriptObject ImmutabilityTrung bình4 lựa chọn

How does Object.seal() differ from Object.freeze()?

JavaScriptObject ImmutabilityNâng cao4 lựa chọn

What does Object.preventExtensions() do?

JavaScriptObject ImmutabilityNâng cao4 lựa chọn

What are object getters and setters used for?

JavaScriptGetters SettersTrung bình4 lựa chọn

Which property flag controls whether a property can be deleted or its attributes changed?

JavaScriptProperty DescriptorsNâng cao4 lựa chọn

How can you reliably check whether an object is empty?

JavaScriptObjectsCơ bản4 lựa chọn

In the event loop, which queue is fully drained before the next macrotask runs?

JavaScriptEvent LoopNâng cao4 lựa chọn

What is the key difference between synchronous and asynchronous functions?

JavaScriptAsyncCơ bản4 lựa chọn

Why should heavy operations like network requests be asynchronous?

JavaScriptAsyncTrung bình4 lựa chọn

What are the three states of a Promise?

JavaScriptPromisesCơ bản4 lựa chọn

Which methods handle a Promise's success and failure?

JavaScriptPromisesTrung bình4 lựa chọn

What is a benefit of Promises over nested callbacks?

JavaScriptPromisesTrung bình4 lựa chọn

What does Promise.all() do?

JavaScriptPromisesTrung bình4 lựa chọn

How does Promise.allSettled() differ from Promise.all()?

JavaScriptPromisesNâng cao4 lựa chọn

What does the await keyword do inside an async function?

JavaScriptAsync AwaitTrung bình4 lựa chọn

How do you handle errors when using async/await?

JavaScriptAsync AwaitTrung bình4 lựa chọn

When are microtasks (like promise callbacks) executed?

JavaScriptMicrotasksNâng cao4 lựa chọn

In Node.js, which callback runs before the next event loop iteration begins?

JavaScriptTimersNâng cao4 lựa chọn

How does prototypal inheritance work in JavaScript?

JavaScriptPrototypesTrung bình4 lựa chọn

What is at the end of an object's prototype chain?

JavaScriptPrototypesTrung bình4 lựa chọn

How does classical inheritance differ from prototypal inheritance?

JavaScriptInheritanceTrung bình4 lựa chọn

Which keywords implement inheritance in ES2015 classes?

JavaScriptClassesCơ bản4 lựa chọn

Which is NOT one of the things the `new` keyword does?

JavaScriptNew KeywordNâng cao4 lựa chọn

What is the convention when naming a constructor function?

JavaScriptConstructorsCơ bản4 lựa chọn

How do ES2015 classes define static methods compared to ES5 constructors?

JavaScriptClassesTrung bình4 lựa chọn

Why use an arrow function for a method defined inside a constructor?

JavaScriptArrow FunctionsNâng cao4 lựa chọn

How are static class members accessed?

JavaScriptStatic MembersTrung bình4 lựa chọn

What is a closure?

JavaScriptClosuresTrung bình4 lựa chọn

What does lexical scoping mean?

JavaScriptScopeTrung bình4 lựa chọn

Which are the three main types of scope in JavaScript?

JavaScriptScopeCơ bản4 lựa chọn

How can closures create private variables?

JavaScriptClosuresNâng cao4 lựa chọn

What is a potential pitfall of closures?

JavaScriptClosuresTrung bình4 lựa chọn

When a regular function is called as a free function (not a method) in strict mode, what is `this`?

JavaScriptThisNâng cao4 lựa chọn

What is `this` inside an arrow function?

JavaScriptThisTrung bình4 lựa chọn

What does Function.prototype.bind do?

JavaScriptBindTrung bình4 lựa chọn

Which of these is 'explicit binding' of this?

JavaScriptThisTrung bình4 lựa chọn

A common way to preserve the correct `this` when passing a method as a callback is:

JavaScriptThisCơ bản4 lựa chọn

What is the DOM?

JavaScriptDomCơ bản4 lựa chọn

What is the difference between an HTML attribute and a DOM property?

JavaScriptDomTrung bình4 lựa chọn

How does document.querySelector() differ from document.getElementById()?

JavaScriptDomTrung bình4 lựa chọn

Which method creates a new element to insert into the DOM?

JavaScriptDomCơ bản4 lựa chọn

How do you attach an event listener to an element?

JavaScriptEventsCơ bản4 lựa chọn

What are the three phases of DOM event propagation, in order?

JavaScriptEventsTrung bình4 lựa chọn

In event bubbling, an event propagates:

JavaScriptEventsCơ bản4 lựa chọn

How is event capturing different from event bubbling?

JavaScriptEventsTrung bình4 lựa chọn

What is event delegation?

JavaScriptEventsTrung bình4 lựa chọn

How do you stop an event's default action, e.g. a form submitting?

JavaScriptEventsCơ bản4 lựa chọn

What is the difference between preventDefault() and stopPropagation()?

JavaScriptEventsTrung bình4 lựa chọn

What is the key difference between mouseenter and mouseover?

JavaScriptEventsNâng cao4 lựa chọn

What is the difference between innerHTML and textContent?

JavaScriptDomTrung bình4 lựa chọn

How do you toggle a CSS class on an element in JavaScript?

JavaScriptDomCơ bản4 lựa chọn

How does <script defer> behave?

JavaScriptScript LoadingTrung bình4 lựa chọn

What is the difference between the Window and Document objects?

JavaScriptBomCơ bản4 lựa chọn

Which client storage mechanism is automatically sent to the server on every HTTP request?

JavaScriptStorageTrung bình4 lựa chọn

How does sessionStorage differ from localStorage?

JavaScriptStorageTrung bình4 lựa chọn

What does the Fetch API's fetch() function return?

JavaScriptFetchCơ bản4 lựa chọn

Which is a popular third-party library for making API calls?

JavaScriptApi CallsCơ bản4 lựa chọn

What does AJAX enable?

JavaScriptAjaxTrung bình4 lựa chọn

Which is a disadvantage of AJAX?

JavaScriptAjaxTrung bình4 lựa chọn

Which is a difference between fetch() and XMLHttpRequest?

JavaScriptFetchNâng cao4 lựa chọn

How do you cancel an in-flight fetch request?

JavaScriptAbortTrung bình4 lựa chọn

How does JSONP bypass the same-origin policy?

JavaScriptJsonpNâng cao4 lựa chọn

What is a key limitation of Web Workers?

JavaScriptWorkersTrung bình4 lựa chọn

Which type of worker acts as a network proxy enabling offline caching and push notifications?

JavaScriptWorkersNâng cao4 lựa chọn

What does the WebSocket API provide?

JavaScriptWebsocketTrung bình4 lựa chọn

What is a polyfill?

JavaScriptPolyfillsTrung bình4 lựa chọn

Which HTML tag shows content when JavaScript is disabled?

JavaScriptHtml JsCơ bản4 lựa chọn

What is the Intl namespace object used for?

JavaScriptIntlTrung bình4 lựa chọn

Which method checks whether a form input satisfies its validation constraints?

JavaScriptFormsTrung bình4 lựa chọn

Which window.history method adds a new entry to the session history without reloading?

JavaScriptHistoryTrung bình4 lựa chọn

How can a page and its iframe communicate across origins?

JavaScriptIframesTrung bình4 lựa chọn

How does the DOMContentLoaded event differ from the load event?

JavaScriptEventsTrung bình4 lựa chọn

How do you redirect the browser to a new URL in JavaScript?

JavaScriptNavigationCơ bản4 lựa chọn

Which API reads query string parameters from the current URL?

JavaScriptUrlTrung bình4 lựa chọn

How do Server-Sent Events (EventSource) differ from WebSockets?

JavaScriptServer Sent EventsNâng cao4 lựa chọn

Which technologies enable Progressive Web Applications (PWAs)?

JavaScriptPwaTrung bình4 lựa chọn

Why are JavaScript modules useful?

JavaScriptModulesCơ bản4 lựa chọn

Which is a difference between CommonJS and ES modules?

JavaScriptModulesNâng cao4 lựa chọn

How do you export a single default value from an ES module?

JavaScriptModulesCơ bản4 lựa chọn

What is a key benefit of a module bundler like Webpack or Vite?

JavaScriptBundlersTrung bình4 lựa chọn

What is tree shaking?

JavaScriptBundlersNâng cao4 lựa chọn

Where are a JavaScript module's metadata fields (name, version, dependencies) typically defined?

JavaScriptModulesCơ bản4 lựa chọn

Which module system is the official ECMAScript standard, natively supported in browsers and Node?

JavaScriptModulesTrung bình4 lựa chọn

Which are the three main categories of JavaScript errors?

JavaScriptErrorsCơ bản4 lựa chọn

What is the role of a try...catch block?

JavaScriptErrorsCơ bản4 lựa chọn

When does the finally block run?

JavaScriptErrorsTrung bình4 lựa chọn

How do you create a custom error type in JavaScript?

JavaScriptErrorsTrung bình4 lựa chọn

What is error propagation?

JavaScriptErrorsTrung bình4 lựa chọn

What is currying?

JavaScriptCurryingNâng cao4 lựa chọn

What does partial application do?

JavaScriptPartial ApplicationNâng cao4 lựa chọn

How do currying and partial application differ?

JavaScriptCurryingTrung bình4 lựa chọn

What is the difference between a Set and a Map?

JavaScriptCollectionsCơ bản4 lựa chọn

What is a key characteristic of WeakMap keys compared to Map keys?

JavaScriptCollectionsNâng cao4 lựa chọn

How do you convert a Set to an array?

JavaScriptCollectionsCơ bản4 lựa chọn

Which is an advantage of a Map over a plain object?

JavaScriptCollectionsTrung bình4 lựa chọn

How do Sets and Maps compare objects for equality?

JavaScriptCollectionsNâng cao4 lựa chọn

Which is a common JavaScript performance bottleneck?

JavaScriptPerformanceTrung bình4 lựa chọn

What is the difference between debouncing and throttling?

JavaScriptPerformanceNâng cao4 lựa chọn

Which technique optimizes DOM manipulation?

JavaScriptPerformanceTrung bình4 lựa chọn

Which helps reduce reflows and repaints?

JavaScriptPerformanceTrung bình4 lựa chọn

What is lazy loading?

JavaScriptPerformanceCơ bản4 lựa chọn

How do Web Workers improve performance?

JavaScriptPerformanceTrung bình4 lựa chọn

What is caching used for in front-end performance?

JavaScriptPerformanceCơ bản4 lựa chọn

Which tool provides a Performance panel and audits for analyzing JS performance?

JavaScriptPerformanceCơ bản4 lựa chọn

Which optimizes network requests?

JavaScriptPerformanceTrung bình4 lựa chọn

Which testing type checks individual components in isolation?

JavaScriptTestingCơ bản4 lựa chọn

What does end-to-end (E2E) testing verify?

JavaScriptTestingTrung bình4 lựa chọn

Which is a popular JavaScript testing framework known for integration with React?

JavaScriptTestingCơ bản4 lựa chọn

In Jest, which assertion checks that sum(1,2) equals 3?

JavaScriptTestingTrung bình4 lựa chọn

What is the core cycle of Test-Driven Development (TDD)?

JavaScriptTestingTrung bình4 lựa chọn

What is the difference between a stub and a mock?

JavaScriptTestingNâng cao4 lựa chọn

How do you test asynchronous code in Jest?

JavaScriptTestingTrung bình4 lựa chọn

What does code coverage measure?

JavaScriptTestingTrung bình4 lựa chọn

What are design patterns?

JavaScriptDesign PatternsCơ bản4 lựa chọn

What does the Singleton pattern guarantee?

JavaScriptDesign PatternsTrung bình4 lựa chọn

What is the purpose of the Factory pattern?

JavaScriptDesign PatternsTrung bình4 lựa chọn

How does the Observer pattern work?

JavaScriptDesign PatternsTrung bình4 lựa chọn

How does the Module pattern achieve encapsulation?

JavaScriptDesign PatternsNâng cao4 lựa chọn

What does the Prototype pattern do?

JavaScriptDesign PatternsTrung bình4 lựa chọn

What does the Decorator pattern allow?

JavaScriptDesign PatternsNâng cao4 lựa chọn

What is the Strategy pattern used for?

JavaScriptDesign PatternsNâng cao4 lựa chọn

What does the Command pattern encapsulate?

JavaScriptDesign PatternsNâng cao4 lựa chọn

Why is extending built-in objects (e.g. Array.prototype) generally discouraged?

JavaScriptBest PracticesTrung bình4 lựa chọn

What is Cross-Site Scripting (XSS)?

JavaScriptSecurityTrung bình4 lựa chọn

Which mitigates Cross-Site Request Forgery (CSRF)?

JavaScriptSecurityNâng cao4 lựa chọn

How do you prevent SQL injection?

JavaScriptSecurityTrung bình4 lựa chọn

Which is a best practice for handling sensitive data in JavaScript?

JavaScriptSecurityTrung bình4 lựa chọn

What does a Content Security Policy (CSP) do?

JavaScriptSecurityNâng cao4 lựa chọn

What does the X-Content-Type-Options security header do?

JavaScriptSecurityTrung bình4 lựa chọn

Which header helps prevent clickjacking?

JavaScriptSecurityTrung bình4 lựa chọn

Why is input validation important for security?

JavaScriptSecurityCơ bản4 lựa chọn

Which tool checks installed dependencies for known security vulnerabilities?

JavaScriptSecurityTrung bình4 lựa chọn

Which is a common approach for secure authentication in JS applications?

JavaScriptAuthTrung bình4 lựa chọn

What does the same-origin policy restrict?

JavaScriptSecurityNâng cao4 lựa chọn

What is a benefit of enabling 'use strict'?

JavaScriptStrict ModeTrung bình4 lựa chọn

Which statement pauses execution to invoke the debugger where supported?

JavaScriptDebuggingCơ bản4 lựa chọn

Which algorithm underlies most JavaScript garbage collection?

JavaScriptGarbage CollectionNâng cao4 lựa chọn

What does the marking phase of mark-and-sweep do?

JavaScriptGarbage CollectionTrung bình4 lựa chọn

How are Single Page Applications typically made SEO-friendly?

JavaScriptSpaTrung bình4 lựa chọn

What is the standard way to share code between JavaScript files?

JavaScriptModulesCơ bản4 lựa chọn

Which is an advantage of using TypeScript over plain JavaScript?

JavaScriptTypescriptTrung bình4 lựa chọn

Why is document.write() discouraged in modern web development?

JavaScriptDomTrung bình4 lựa chọn

What kind of technology is React?

ReactReact BasicsCơ bản4 lựa chọn

Which of the following is a core benefit of React's declarative model?

ReactReact BasicsTrung bình4 lựa chọn

Why is React's component-based architecture considered a benefit?

ReactReact BasicsNâng cao4 lựa chọn

Which statement best describes a React Element?

ReactReact ElementsCơ bản4 lựa chọn

What is a React Component?

ReactReact ElementsTrung bình4 lựa chọn

Which of these is NOT a valid React Node?

ReactReact ElementsNâng cao4 lựa chọn

What does JSX stand for?

ReactJsxCơ bản4 lựa chọn

Into what is the JSX `<div>Hello</div>` typically transformed?

ReactJsxTrung bình4 lựa chọn

Which statement about JSX is correct?

ReactJsxNâng cao4 lựa chọn

What is the key difference between state and props?

ReactState PropsCơ bản4 lựa chọn

How does a child component cause a change to data owned by its parent?

ReactState PropsTrung bình4 lựa chọn

Where should shared state ideally live in React's one-way data flow?

ReactState PropsNâng cao4 lựa chọn

What is the purpose of the `key` prop when rendering lists?

ReactKeysCơ bản4 lựa chọn

A `key` must be unique among which scope?

ReactKeysTrung bình4 lựa chọn

Changing a component's `key` to a new value causes React to:

ReactKeysNâng cao4 lựa chọn

Using array indices as keys is problematic mainly when the list is:

ReactKeysCơ bản4 lựa chọn

What is a symptom of incorrectly using array indices as keys?

ReactKeysTrung bình4 lựa chọn

When is using an array index as a key actually acceptable?

ReactKeysNâng cao4 lựa chọn

In a controlled component, the source of truth for a form input's value is:

ReactControlled ComponentsCơ bản4 lựa chọn

How do you typically read the value of an uncontrolled input?

ReactControlled ComponentsTrung bình4 lựa chọn

Which input type is always uncontrolled in React?

ReactControlled ComponentsNâng cao4 lựa chọn

Which is a common pitfall when using React Context?

ReactContextCơ bản4 lựa chọn

Will wrapping a consumer in `React.memo` stop it re-rendering when context changes?

ReactContextTrung bình4 lựa chọn

For frequently-changing, independent slices of shared state, a good alternative to one big context is:

ReactContextNâng cao4 lựa chọn

What do hooks let you do?

ReactHooksCơ bản4 lựa chọn

Which class-era problem did hooks help solve?

ReactHooksTrung bình4 lựa chọn

What makes stateful logic genuinely reusable between function components?

ReactHooksNâng cao4 lựa chọn

Where must React hooks be called?

ReactHooks RulesCơ bản4 lựa chọn

From where are you allowed to call hooks?

ReactHooks RulesTrung bình4 lựa chọn

Which tool helps enforce the rules of hooks?

ReactHooks RulesNâng cao4 lựa chọn

When does `useEffect` run relative to the browser paint?

ReactEffectsCơ bản4 lựa chọn

When should you prefer `useLayoutEffect` over `useEffect`?

ReactEffectsTrung bình4 lựa chọn

What is true about `useLayoutEffect` during server-side rendering?

ReactEffectsNâng cao4 lựa chọn

What does the updater (callback) form `setCount(c => c + 1)` guarantee?

ReactSetstateCơ bản4 lựa chọn

Calling `setCount(c => c + 1)` twice in the same handler (starting at 0) results in:

ReactSetstateTrung bình4 lựa chọn

When is the updater form especially important?

ReactSetstateNâng cao4 lựa chọn

What does an empty dependency array `[]` in useEffect mean?

ReactEffectsCơ bản4 lựa chọn

If you omit the dependency array of useEffect entirely, the effect:

ReactEffectsTrung bình4 lựa chọn

What does the dependency array control?

ReactEffectsNâng cao4 lựa chọn

What is `useRef` primarily used for?

ReactUserefCơ bản4 lựa chọn

A common DOM use of useRef is to:

ReactUserefTrung bình4 lựa chọn

Updating `ref.current` differs from updating state because it:

ReactUserefNâng cao4 lựa chọn

What does `useCallback` return?

ReactUsecallbackCơ bản4 lựa chọn

What is the real benefit of the referential stability useCallback provides?

ReactUsecallbackTrung bình4 lựa chọn

How does the React Compiler (stable in React 19) affect useCallback usage?

ReactUsecallbackNâng cao4 lựa chọn

What is `useMemo` used for?

ReactUsememoCơ bản4 lựa chọn

When is useMemo most appropriate?

ReactUsememoTrung bình4 lựa chọn

What is the key difference between useMemo and useCallback?

ReactUsememoNâng cao4 lựa chọn

What does `useReducer` return?

ReactUsereducerCơ bản4 lựa chọn

When is useReducer preferable to useState?

ReactUsereducerTrung bình4 lựa chọn

What two arguments does useReducer take?

ReactUsereducerNâng cao4 lựa chọn

What does the `useId` hook generate?

ReactUseidCơ bản4 lựa chọn

Why does useId exist?

ReactUseidTrung bình4 lựa chọn

Which is an appropriate use of useId?

ReactUseidNâng cao4 lựa chọn

What triggers a re-render in React?

ReactRenderingCơ bản4 lựa chọn

During a re-render, how does React decide what DOM to update?

ReactRenderingTrung bình4 lựa chọn

What are React Fragments used for?

ReactFragmentsCơ bản4 lựa chọn

Which is the shorthand syntax for a React Fragment?

ReactFragmentsTrung bình4 lựa chọn

What was `forwardRef()` historically used for?

ReactRefsCơ bản4 lựa chọn

What changed about forwardRef in React 19?

ReactRefsTrung bình4 lựa chọn

In React 19+, how does a function component receive a forwarded ref?

ReactRefsNâng cao4 lựa chọn

What is the most idiomatic way to fully reset a component's state?

ReactState ResetCơ bản4 lựa chọn

For a finer-grained reset without remounting, you can:

ReactState ResetTrung bình4 lựa chọn

Why does changing the key reset state?

ReactState ResetNâng cao4 lựa chọn

Why does React recommend against mutating state directly?

ReactImmutabilityCơ bản4 lựa chọn

Mutating state in place can break which of the following?

ReactImmutabilityTrung bình4 lựa chọn

What is the correct way to update array state immutably?

ReactImmutabilityNâng cao4 lựa chọn

What do error boundaries do?

ReactError BoundariesCơ bản4 lựa chọn

Which do error boundaries NOT catch?

ReactError BoundariesTrung bình4 lựa chọn

How are error boundaries implemented today?

ReactError BoundariesNâng cao4 lựa chọn

Which library encourages testing React components the way users interact with them?

ReactTestingCơ bản4 lựa chọn

Which tool is preferred for simulating user interactions in tests?

ReactTestingTrung bình4 lựa chọn

Which tool is commonly used to mock network calls in React tests?

ReactTestingNâng cao4 lựa chọn

What is React hydration?

ReactHydrationCơ bản4 lựa chọn

Hydration happens after which step?

ReactHydrationTrung bình4 lựa chọn

What do React Portals let you do?

ReactPortalsCơ bản4 lựa chọn

Even though a portal's DOM lives elsewhere, events from it:

ReactPortalsTrung bình4 lựa chọn

Which function creates a portal?

ReactPortalsNâng cao4 lựa chọn

Which browser extension helps inspect the React component tree?

ReactDebuggingCơ bản4 lựa chọn

Enabling Strict Mode during development helps by:

ReactDebuggingTrung bình4 lựa chọn

What does React Strict Mode render to the page?

ReactStrict ModeCơ bản4 lựa chọn

Which is a benefit of Strict Mode?

ReactStrict ModeTrung bình4 lựa chọn

What behavior does Strict Mode add to effects in development?

ReactStrict ModeNâng cao4 lựa chọn

Which libraries are commonly used to localize React applications?

ReactI18nCơ bản4 lựa chọn

With react-i18next, how do you typically render translated text?

ReactI18nTrung bình4 lựa chọn

What is code splitting in a React application?

ReactCode SplittingCơ bản4 lựa chọn

Which React APIs enable code splitting for components?

ReactCode SplittingTrung bình4 lựa chọn

What does the `fallback` prop of Suspense provide during lazy loading?

ReactCode SplittingNâng cao4 lựa chọn

In 2026, what should you adopt first to reduce context-driven re-renders?

ReactContext PerfCơ bản4 lựa chọn

Which pattern reduces re-renders for consumers that only dispatch?

ReactContext PerfTrung bình4 lựa chọn

Which library helps subscribe to a slice of a large context value?

ReactContext PerfNâng cao4 lựa chọn

What is a higher order component (HOC)?

ReactHocCơ bản4 lựa chọn

What is the modern recommendation regarding HOCs?

ReactHocTrung bình4 lựa chọn

Which well-known API is an example of an HOC?

ReactHocNâng cao4 lựa chọn

What data flow does the Flux pattern enforce?

ReactFluxCơ bản4 lựa chọn

In Flux, what is the role of the Dispatcher?

ReactFluxTrung bình4 lựa chọn

Which modern tools were inspired by Flux?

ReactFluxNâng cao4 lựa chọn

In React's one-way data flow, data moves:

ReactData FlowCơ bản4 lựa chọn

React's one-way data flow contrasts with which mechanism?

ReactData FlowTrung bình4 lựa chọn

What does the React documentation recommend instead of hand-rolling useEffect + fetch?

ReactAsync DataCơ bản4 lựa chọn

In React 19, which hook lets a component read a promise directly and suspend?

ReactAsync DataTrung bình4 lựa chọn

A hand-written useEffect + fetch needs which safeguards to avoid bugs?

ReactAsync DataNâng cao4 lựa chọn

What is server-side rendering (SSR) in React?

ReactSsrCơ bản4 lựa chọn

Which is a benefit of SSR?

ReactSsrTrung bình4 lựa chọn

Which API enables streaming SSR in Node?

ReactSsrNâng cao4 lựa chọn

When does static generation (SSG) render pages?

ReactSsgCơ bản4 lựa chọn

What does Incremental Static Regeneration (ISR) add to SSG?

ReactSsgTrung bình4 lựa chọn

SSG is best suited for content that:

ReactSsgNâng cao4 lựa chọn

In the presentational vs container pattern, presentational components:

ReactPatternsCơ bản4 lựa chọn

What is the modern view on the presentational/container split?

ReactPatternsTrung bình4 lựa chọn

Which is a common data-fetching pitfall in React?

ReactData Fetching PitfallsCơ bản4 lựa chọn

Why can fetching data during render cause problems?

ReactData Fetching PitfallsTrung bình4 lựa chọn

What should you account for regarding StrictMode and effects during development?

ReactData Fetching PitfallsNâng cao4 lựa chọn

What is a render prop?

ReactRender PropsCơ bản4 lựa chọn

Which is the more common modern form of a render prop?

ReactRender PropsTrung bình4 lựa chọn

What largely replaced render props for sharing stateful logic?

ReactRender PropsNâng cao4 lựa chọn

Which is a React anti-pattern?

ReactAnti PatternsCơ bản4 lựa chọn

Which of these is an anti-pattern related to derived data?

ReactAnti PatternsTrung bình4 lựa chọn

Why is mirroring props into useState an anti-pattern?

ReactAnti PatternsNâng cao4 lựa chọn

Which tool fits purely local component state?

ReactState DecisionCơ bản4 lựa chọn

React Context is best used for values that:

ReactState DecisionTrung bình4 lựa chọn

How should server state (caching, refetching, invalidation) be handled?

ReactState DecisionNâng cao4 lựa chọn

What is the composition pattern in React?

ReactCompositionCơ bản4 lựa chọn

Which is a form of composition in React?

ReactCompositionTrung bình4 lựa chọn

A parent that exposes related sub-components like <Tabs.List> and <Tabs.Panel> is an example of:

ReactCompositionNâng cao4 lựa chọn

What is the 'virtual DOM' in React?

ReactVirtual DomCơ bản4 lựa chọn

What is the main benefit of the virtual DOM?

ReactVirtual DomTrung bình4 lựa chọn

Which terms does the React team now prefer over 'virtual DOM'?

ReactVirtual DomNâng cao4 lựa chọn

What is React Fiber?

ReactFiberCơ bản4 lựa chọn

What key capability does Fiber add to rendering?

ReactFiberTrung bình4 lựa chọn

Which features did Fiber make possible that the old stack reconciler could not?

ReactFiberNâng cao4 lựa chọn

What is reconciliation in React?

ReactReconciliationCơ bản4 lựa chọn

What is the comparison step in reconciliation called?

ReactReconciliationTrung bình4 lựa chọn

What does React Suspense let you do?

ReactSuspenseCơ bản4 lựa chọn

Suspense is commonly used together with which API for code splitting?

ReactSuspenseTrung bình4 lựa chọn

What happens immediately when a useState setter is called?

ReactSetstateCơ bản4 lựa chọn

How does React handle multiple setState calls in the same event?

ReactSetstateTrung bình4 lựa chọn

Because state updates are batched and asynchronous, reading the state variable right after calling its setter gives you:

ReactSetstateNâng cao4 lựa chọn