Chuyển tới nội dung chính
Câu hỏi mới đã được thêm!
Khám phá ngay
frontendpro
Tổng quan
Luyện câu hỏi
vi
Đăng nhập
Giá
MỚI
Truy cập đầy đủ
vi
Đăng nhập
Quiz
Mới bắt đầu? Hãy thử
các câu quiz dễ
.
Mặc định
Tiêu đề
Độ khó
Coding
System design
Quiz
JavaScript
React
330
quiz
660
phút ước tính
0
đã hoàn thành
Bộ lọc
Which of the following is NOT a JavaScript primitive data type?
JavaScript
Data Types
Cơ bản
4 lựa chọn
Which operator is used to check the data type of a variable in JavaScript?
JavaScript
Type Checking
Cơ bản
4 lựa chọn
What does `typeof null` return?
JavaScript
Type Checking
Trung bình
4 lựa chọn
How do null, undefined, and an undeclared variable differ?
JavaScript
Null Undefined
Trung bình
4 lựa chọn
Which statement about var, let, and const is correct?
JavaScript
Variables
Cơ bản
4 lựa chọn
Which is true about reassignment and redeclaration?
JavaScript
Variables
Trung bình
4 lựa chọn
Why is it a good idea to avoid polluting the global scope?
JavaScript
Scope
Trung bình
4 lựa chọn
Which is NOT a common way to convert a string to a number in JavaScript?
JavaScript
Conversion
Cơ bản
4 lựa chọn
How do you embed an expression inside a template literal?
JavaScript
Template Literals
Cơ bản
4 lựa chọn
In a tagged template, what does the tag function receive as its first argument?
JavaScript
Tagged Templates
Nâng cao
4 lựa chọn
What does the spread operator (...) do with an array like [...arr]?
JavaScript
Spread
Cơ bản
4 lựa chọn
What are Symbols primarily used for?
JavaScript
Symbols
Trung bình
4 lựa chọn
Does `Symbol('key') === Symbol('key')` evaluate to true?
JavaScript
Symbols
Nâng cao
4 lựa chọn
What is a JavaScript Proxy used for?
JavaScript
Proxies
Trung bình
4 lựa chọn
What is hoisting in JavaScript?
JavaScript
Hoisting
Cơ bản
4 lựa chọn
Accessing a `let` variable before its declaration results in:
JavaScript
Hoisting
Trung bình
4 lựa chọn
What value do you get by accessing a `var` variable before its initialization?
JavaScript
Hoisting
Trung bình
4 lựa chọn
Which are hoisted such that they can be called before their definition?
JavaScript
Hoisting
Trung bình
4 lựa chọn
How can you best avoid problems caused by hoisting?
JavaScript
Hoisting
Cơ bản
4 lựa chọn
What is the key difference between == and === in JavaScript?
JavaScript
Equality
Cơ bản
4 lựa chọn
What is a common legitimate use of the loose equality operator ==?
JavaScript
Equality
Trung bình
4 lựa chọn
Which loop iterates over an object's enumerable properties, including inherited ones?
JavaScript
Iteration
Trung bình
4 lựa chọn
What is the difference between break and continue?
JavaScript
Control Flow
Cơ bản
4 lựa chọn
What is the syntax of the ternary operator?
JavaScript
Operators
Cơ bản
4 lựa chọn
Which array method gives you both the element and its index in the callback?
JavaScript
Arrays
Cơ bản
4 lựa chọn
What does the switch statement do when no case matches?
JavaScript
Control Flow
Cơ bản
4 lựa chọn
What do rest parameters (...args) do?
JavaScript
Functions
Cơ bản
4 lựa chọn
How do spread and rest syntax differ, despite sharing the ... token?
JavaScript
Spread Rest
Trung bình
4 lựa chọn
What must an iterator object implement?
JavaScript
Iterators Generators
Nâng cao
4 lựa chọn
How is a generator function declared?
JavaScript
Iterators Generators
Nâng cao
4 lựa chọn
What is the difference between `function foo(){}` and `var foo = function(){}`?
JavaScript
Functions
Trung bình
4 lựa chọn
What is the difference between a parameter and an argument?
JavaScript
Functions
Cơ bản
4 lựa chọn
What is a key benefit of arrow functions in callbacks?
JavaScript
Functions
Cơ bản
4 lựa chọn
What does `const p = Person()` do if Person is meant to be a constructor?
JavaScript
Constructors
Trung bình
4 lựa chọn
What defines a higher-order function?
JavaScript
Higher Order Functions
Trung bình
4 lựa chọn
What is a callback function?
JavaScript
Callbacks
Cơ bản
4 lựa chọn
What is a typical use case for anonymous functions?
JavaScript
Anonymous Functions
Cơ bản
4 lựa chọn
What is essential to prevent infinite recursion?
JavaScript
Recursion
Trung bình
4 lựa chọn
When is a default parameter's value used?
JavaScript
Default Parameters
Cơ bản
4 lựa chọn
Why does `function foo(){}();` fail as an IIFE, and how do you fix it?
JavaScript
Iife
Nâng cao
4 lựa chọn
Which is NOT a standard way to create an object in JavaScript?
JavaScript
Objects
Cơ bản
4 lựa chọn
When must you use bracket notation instead of dot notation?
JavaScript
Objects
Trung bình
4 lựa chọn
Which array method transforms each element and returns a new array?
JavaScript
Arrays
Cơ bản
4 lựa chọn
Which method can add or remove elements at any position in an array?
JavaScript
Arrays
Trung bình
4 lựa chọn
Which produces a shallow copy of an object?
JavaScript
Copying
Trung bình
4 lựa chọn
What is the key difference between a shallow copy and a deep copy?
JavaScript
Copying
Nâng cao
4 lựa chọn
Which modern built-in creates a deep copy of an object?
JavaScript
Copying
Trung bình
4 lựa chọn
Which reliably checks for an object's own property (excluding inherited ones)?
JavaScript
Objects
Trung bình
4 lựa chọn
What is the difference between mutable and immutable objects?
JavaScript
Immutability
Trung bình
4 lựa chọn
What does destructuring assignment let you do?
JavaScript
Destructuring
Cơ bản
4 lựa chọn
What does Object.freeze() do?
JavaScript
Object Immutability
Trung bình
4 lựa chọn
How does Object.seal() differ from Object.freeze()?
JavaScript
Object Immutability
Nâng cao
4 lựa chọn
What does Object.preventExtensions() do?
JavaScript
Object Immutability
Nâng cao
4 lựa chọn
What are object getters and setters used for?
JavaScript
Getters Setters
Trung bình
4 lựa chọn
Which property flag controls whether a property can be deleted or its attributes changed?
JavaScript
Property Descriptors
Nâng cao
4 lựa chọn
How can you reliably check whether an object is empty?
JavaScript
Objects
Cơ bản
4 lựa chọn
In the event loop, which queue is fully drained before the next macrotask runs?
JavaScript
Event Loop
Nâng cao
4 lựa chọn
What is the key difference between synchronous and asynchronous functions?
JavaScript
Async
Cơ bản
4 lựa chọn
Why should heavy operations like network requests be asynchronous?
JavaScript
Async
Trung bình
4 lựa chọn
What are the three states of a Promise?
JavaScript
Promises
Cơ bản
4 lựa chọn
Which methods handle a Promise's success and failure?
JavaScript
Promises
Trung bình
4 lựa chọn
What is a benefit of Promises over nested callbacks?
JavaScript
Promises
Trung bình
4 lựa chọn
What does Promise.all() do?
JavaScript
Promises
Trung bình
4 lựa chọn
How does Promise.allSettled() differ from Promise.all()?
JavaScript
Promises
Nâng cao
4 lựa chọn
What does the await keyword do inside an async function?
JavaScript
Async Await
Trung bình
4 lựa chọn
How do you handle errors when using async/await?
JavaScript
Async Await
Trung bình
4 lựa chọn
When are microtasks (like promise callbacks) executed?
JavaScript
Microtasks
Nâng cao
4 lựa chọn
In Node.js, which callback runs before the next event loop iteration begins?
JavaScript
Timers
Nâng cao
4 lựa chọn
How does prototypal inheritance work in JavaScript?
JavaScript
Prototypes
Trung bình
4 lựa chọn
What is at the end of an object's prototype chain?
JavaScript
Prototypes
Trung bình
4 lựa chọn
How does classical inheritance differ from prototypal inheritance?
JavaScript
Inheritance
Trung bình
4 lựa chọn
Which keywords implement inheritance in ES2015 classes?
JavaScript
Classes
Cơ bản
4 lựa chọn
Which is NOT one of the things the `new` keyword does?
JavaScript
New Keyword
Nâng cao
4 lựa chọn
What is the convention when naming a constructor function?
JavaScript
Constructors
Cơ bản
4 lựa chọn
How do ES2015 classes define static methods compared to ES5 constructors?
JavaScript
Classes
Trung bình
4 lựa chọn
Why use an arrow function for a method defined inside a constructor?
JavaScript
Arrow Functions
Nâng cao
4 lựa chọn
How are static class members accessed?
JavaScript
Static Members
Trung bình
4 lựa chọn
What is a closure?
JavaScript
Closures
Trung bình
4 lựa chọn
What does lexical scoping mean?
JavaScript
Scope
Trung bình
4 lựa chọn
Which are the three main types of scope in JavaScript?
JavaScript
Scope
Cơ bản
4 lựa chọn
How can closures create private variables?
JavaScript
Closures
Nâng cao
4 lựa chọn
What is a potential pitfall of closures?
JavaScript
Closures
Trung bình
4 lựa chọn
When a regular function is called as a free function (not a method) in strict mode, what is `this`?
JavaScript
This
Nâng cao
4 lựa chọn
What is `this` inside an arrow function?
JavaScript
This
Trung bình
4 lựa chọn
What does Function.prototype.bind do?
JavaScript
Bind
Trung bình
4 lựa chọn
Which of these is 'explicit binding' of this?
JavaScript
This
Trung bình
4 lựa chọn
A common way to preserve the correct `this` when passing a method as a callback is:
JavaScript
This
Cơ bản
4 lựa chọn
What is the DOM?
JavaScript
Dom
Cơ bản
4 lựa chọn
What is the difference between an HTML attribute and a DOM property?
JavaScript
Dom
Trung bình
4 lựa chọn
How does document.querySelector() differ from document.getElementById()?
JavaScript
Dom
Trung bình
4 lựa chọn
Which method creates a new element to insert into the DOM?
JavaScript
Dom
Cơ bản
4 lựa chọn
How do you attach an event listener to an element?
JavaScript
Events
Cơ bản
4 lựa chọn
What are the three phases of DOM event propagation, in order?
JavaScript
Events
Trung bình
4 lựa chọn
In event bubbling, an event propagates:
JavaScript
Events
Cơ bản
4 lựa chọn
How is event capturing different from event bubbling?
JavaScript
Events
Trung bình
4 lựa chọn
What is event delegation?
JavaScript
Events
Trung bình
4 lựa chọn
How do you stop an event's default action, e.g. a form submitting?
JavaScript
Events
Cơ bản
4 lựa chọn
What is the difference between preventDefault() and stopPropagation()?
JavaScript
Events
Trung bình
4 lựa chọn
What is the key difference between mouseenter and mouseover?
JavaScript
Events
Nâng cao
4 lựa chọn
What is the difference between innerHTML and textContent?
JavaScript
Dom
Trung bình
4 lựa chọn
How do you toggle a CSS class on an element in JavaScript?
JavaScript
Dom
Cơ bản
4 lựa chọn
How does <script defer> behave?
JavaScript
Script Loading
Trung bình
4 lựa chọn
What is the difference between the Window and Document objects?
JavaScript
Bom
Cơ bản
4 lựa chọn
Which client storage mechanism is automatically sent to the server on every HTTP request?
JavaScript
Storage
Trung bình
4 lựa chọn
How does sessionStorage differ from localStorage?
JavaScript
Storage
Trung bình
4 lựa chọn
What does the Fetch API's fetch() function return?
JavaScript
Fetch
Cơ bản
4 lựa chọn
Which is a popular third-party library for making API calls?
JavaScript
Api Calls
Cơ bản
4 lựa chọn
What does AJAX enable?
JavaScript
Ajax
Trung bình
4 lựa chọn
Which is a disadvantage of AJAX?
JavaScript
Ajax
Trung bình
4 lựa chọn
Which is a difference between fetch() and XMLHttpRequest?
JavaScript
Fetch
Nâng cao
4 lựa chọn
How do you cancel an in-flight fetch request?
JavaScript
Abort
Trung bình
4 lựa chọn
How does JSONP bypass the same-origin policy?
JavaScript
Jsonp
Nâng cao
4 lựa chọn
What is a key limitation of Web Workers?
JavaScript
Workers
Trung bình
4 lựa chọn
Which type of worker acts as a network proxy enabling offline caching and push notifications?
JavaScript
Workers
Nâng cao
4 lựa chọn
What does the WebSocket API provide?
JavaScript
Websocket
Trung bình
4 lựa chọn
What is a polyfill?
JavaScript
Polyfills
Trung bình
4 lựa chọn
Which HTML tag shows content when JavaScript is disabled?
JavaScript
Html Js
Cơ bản
4 lựa chọn
What is the Intl namespace object used for?
JavaScript
Intl
Trung bình
4 lựa chọn
Which method checks whether a form input satisfies its validation constraints?
JavaScript
Forms
Trung bình
4 lựa chọn
Which window.history method adds a new entry to the session history without reloading?
JavaScript
History
Trung bình
4 lựa chọn
How can a page and its iframe communicate across origins?
JavaScript
Iframes
Trung bình
4 lựa chọn
How does the DOMContentLoaded event differ from the load event?
JavaScript
Events
Trung bình
4 lựa chọn
How do you redirect the browser to a new URL in JavaScript?
JavaScript
Navigation
Cơ bản
4 lựa chọn
Which API reads query string parameters from the current URL?
JavaScript
Url
Trung bình
4 lựa chọn
How do Server-Sent Events (EventSource) differ from WebSockets?
JavaScript
Server Sent Events
Nâng cao
4 lựa chọn
Which technologies enable Progressive Web Applications (PWAs)?
JavaScript
Pwa
Trung bình
4 lựa chọn
Why are JavaScript modules useful?
JavaScript
Modules
Cơ bản
4 lựa chọn
Which is a difference between CommonJS and ES modules?
JavaScript
Modules
Nâng cao
4 lựa chọn
How do you export a single default value from an ES module?
JavaScript
Modules
Cơ bản
4 lựa chọn
What is a key benefit of a module bundler like Webpack or Vite?
JavaScript
Bundlers
Trung bình
4 lựa chọn
What is tree shaking?
JavaScript
Bundlers
Nâng cao
4 lựa chọn
Where are a JavaScript module's metadata fields (name, version, dependencies) typically defined?
JavaScript
Modules
Cơ bản
4 lựa chọn
Which module system is the official ECMAScript standard, natively supported in browsers and Node?
JavaScript
Modules
Trung bình
4 lựa chọn
Which are the three main categories of JavaScript errors?
JavaScript
Errors
Cơ bản
4 lựa chọn
What is the role of a try...catch block?
JavaScript
Errors
Cơ bản
4 lựa chọn
When does the finally block run?
JavaScript
Errors
Trung bình
4 lựa chọn
How do you create a custom error type in JavaScript?
JavaScript
Errors
Trung bình
4 lựa chọn
What is error propagation?
JavaScript
Errors
Trung bình
4 lựa chọn
What is currying?
JavaScript
Currying
Nâng cao
4 lựa chọn
What does partial application do?
JavaScript
Partial Application
Nâng cao
4 lựa chọn
How do currying and partial application differ?
JavaScript
Currying
Trung bình
4 lựa chọn
What is the difference between a Set and a Map?
JavaScript
Collections
Cơ bản
4 lựa chọn
What is a key characteristic of WeakMap keys compared to Map keys?
JavaScript
Collections
Nâng cao
4 lựa chọn
How do you convert a Set to an array?
JavaScript
Collections
Cơ bản
4 lựa chọn
Which is an advantage of a Map over a plain object?
JavaScript
Collections
Trung bình
4 lựa chọn
How do Sets and Maps compare objects for equality?
JavaScript
Collections
Nâng cao
4 lựa chọn
Which is a common JavaScript performance bottleneck?
JavaScript
Performance
Trung bình
4 lựa chọn
What is the difference between debouncing and throttling?
JavaScript
Performance
Nâng cao
4 lựa chọn
Which technique optimizes DOM manipulation?
JavaScript
Performance
Trung bình
4 lựa chọn
Which helps reduce reflows and repaints?
JavaScript
Performance
Trung bình
4 lựa chọn
What is lazy loading?
JavaScript
Performance
Cơ bản
4 lựa chọn
How do Web Workers improve performance?
JavaScript
Performance
Trung bình
4 lựa chọn
What is caching used for in front-end performance?
JavaScript
Performance
Cơ bản
4 lựa chọn
Which tool provides a Performance panel and audits for analyzing JS performance?
JavaScript
Performance
Cơ bản
4 lựa chọn
Which optimizes network requests?
JavaScript
Performance
Trung bình
4 lựa chọn
Which testing type checks individual components in isolation?
JavaScript
Testing
Cơ bản
4 lựa chọn
What does end-to-end (E2E) testing verify?
JavaScript
Testing
Trung bình
4 lựa chọn
Which is a popular JavaScript testing framework known for integration with React?
JavaScript
Testing
Cơ bản
4 lựa chọn
In Jest, which assertion checks that sum(1,2) equals 3?
JavaScript
Testing
Trung bình
4 lựa chọn
What is the core cycle of Test-Driven Development (TDD)?
JavaScript
Testing
Trung bình
4 lựa chọn
What is the difference between a stub and a mock?
JavaScript
Testing
Nâng cao
4 lựa chọn
How do you test asynchronous code in Jest?
JavaScript
Testing
Trung bình
4 lựa chọn
What does code coverage measure?
JavaScript
Testing
Trung bình
4 lựa chọn
What are design patterns?
JavaScript
Design Patterns
Cơ bản
4 lựa chọn
What does the Singleton pattern guarantee?
JavaScript
Design Patterns
Trung bình
4 lựa chọn
What is the purpose of the Factory pattern?
JavaScript
Design Patterns
Trung bình
4 lựa chọn
How does the Observer pattern work?
JavaScript
Design Patterns
Trung bình
4 lựa chọn
How does the Module pattern achieve encapsulation?
JavaScript
Design Patterns
Nâng cao
4 lựa chọn
What does the Prototype pattern do?
JavaScript
Design Patterns
Trung bình
4 lựa chọn
What does the Decorator pattern allow?
JavaScript
Design Patterns
Nâng cao
4 lựa chọn
What is the Strategy pattern used for?
JavaScript
Design Patterns
Nâng cao
4 lựa chọn
What does the Command pattern encapsulate?
JavaScript
Design Patterns
Nâng cao
4 lựa chọn
Why is extending built-in objects (e.g. Array.prototype) generally discouraged?
JavaScript
Best Practices
Trung bình
4 lựa chọn
What is Cross-Site Scripting (XSS)?
JavaScript
Security
Trung bình
4 lựa chọn
Which mitigates Cross-Site Request Forgery (CSRF)?
JavaScript
Security
Nâng cao
4 lựa chọn
How do you prevent SQL injection?
JavaScript
Security
Trung bình
4 lựa chọn
Which is a best practice for handling sensitive data in JavaScript?
JavaScript
Security
Trung bình
4 lựa chọn
What does a Content Security Policy (CSP) do?
JavaScript
Security
Nâng cao
4 lựa chọn
What does the X-Content-Type-Options security header do?
JavaScript
Security
Trung bình
4 lựa chọn
Which header helps prevent clickjacking?
JavaScript
Security
Trung bình
4 lựa chọn
Why is input validation important for security?
JavaScript
Security
Cơ bản
4 lựa chọn
Which tool checks installed dependencies for known security vulnerabilities?
JavaScript
Security
Trung bình
4 lựa chọn
Which is a common approach for secure authentication in JS applications?
JavaScript
Auth
Trung bình
4 lựa chọn
What does the same-origin policy restrict?
JavaScript
Security
Nâng cao
4 lựa chọn
What is a benefit of enabling 'use strict'?
JavaScript
Strict Mode
Trung bình
4 lựa chọn
Which statement pauses execution to invoke the debugger where supported?
JavaScript
Debugging
Cơ bản
4 lựa chọn
Which algorithm underlies most JavaScript garbage collection?
JavaScript
Garbage Collection
Nâng cao
4 lựa chọn
What does the marking phase of mark-and-sweep do?
JavaScript
Garbage Collection
Trung bình
4 lựa chọn
How are Single Page Applications typically made SEO-friendly?
JavaScript
Spa
Trung bình
4 lựa chọn
What is the standard way to share code between JavaScript files?
JavaScript
Modules
Cơ bản
4 lựa chọn
Which is an advantage of using TypeScript over plain JavaScript?
JavaScript
Typescript
Trung bình
4 lựa chọn
Why is document.write() discouraged in modern web development?
JavaScript
Dom
Trung bình
4 lựa chọn
What kind of technology is React?
React
React Basics
Cơ bản
4 lựa chọn
Which of the following is a core benefit of React's declarative model?
React
React Basics
Trung bình
4 lựa chọn
Why is React's component-based architecture considered a benefit?
React
React Basics
Nâng cao
4 lựa chọn
Which statement best describes a React Element?
React
React Elements
Cơ bản
4 lựa chọn
What is a React Component?
React
React Elements
Trung bình
4 lựa chọn
Which of these is NOT a valid React Node?
React
React Elements
Nâng cao
4 lựa chọn
What does JSX stand for?
React
Jsx
Cơ bản
4 lựa chọn
Into what is the JSX `<div>Hello</div>` typically transformed?
React
Jsx
Trung bình
4 lựa chọn
Which statement about JSX is correct?
React
Jsx
Nâng cao
4 lựa chọn
What is the key difference between state and props?
React
State Props
Cơ bản
4 lựa chọn
How does a child component cause a change to data owned by its parent?
React
State Props
Trung bình
4 lựa chọn
Where should shared state ideally live in React's one-way data flow?
React
State Props
Nâng cao
4 lựa chọn
What is the purpose of the `key` prop when rendering lists?
React
Keys
Cơ bản
4 lựa chọn
A `key` must be unique among which scope?
React
Keys
Trung bình
4 lựa chọn
Changing a component's `key` to a new value causes React to:
React
Keys
Nâng cao
4 lựa chọn
Using array indices as keys is problematic mainly when the list is:
React
Keys
Cơ bản
4 lựa chọn
What is a symptom of incorrectly using array indices as keys?
React
Keys
Trung bình
4 lựa chọn
When is using an array index as a key actually acceptable?
React
Keys
Nâng cao
4 lựa chọn
In a controlled component, the source of truth for a form input's value is:
React
Controlled Components
Cơ bản
4 lựa chọn
How do you typically read the value of an uncontrolled input?
React
Controlled Components
Trung bình
4 lựa chọn
Which input type is always uncontrolled in React?
React
Controlled Components
Nâng cao
4 lựa chọn
Which is a common pitfall when using React Context?
React
Context
Cơ bản
4 lựa chọn
Will wrapping a consumer in `React.memo` stop it re-rendering when context changes?
React
Context
Trung bình
4 lựa chọn
For frequently-changing, independent slices of shared state, a good alternative to one big context is:
React
Context
Nâng cao
4 lựa chọn
What do hooks let you do?
React
Hooks
Cơ bản
4 lựa chọn
Which class-era problem did hooks help solve?
React
Hooks
Trung bình
4 lựa chọn
What makes stateful logic genuinely reusable between function components?
React
Hooks
Nâng cao
4 lựa chọn
Where must React hooks be called?
React
Hooks Rules
Cơ bản
4 lựa chọn
From where are you allowed to call hooks?
React
Hooks Rules
Trung bình
4 lựa chọn
Which tool helps enforce the rules of hooks?
React
Hooks Rules
Nâng cao
4 lựa chọn
When does `useEffect` run relative to the browser paint?
React
Effects
Cơ bản
4 lựa chọn
When should you prefer `useLayoutEffect` over `useEffect`?
React
Effects
Trung bình
4 lựa chọn
What is true about `useLayoutEffect` during server-side rendering?
React
Effects
Nâng cao
4 lựa chọn
What does the updater (callback) form `setCount(c => c + 1)` guarantee?
React
Setstate
Cơ bản
4 lựa chọn
Calling `setCount(c => c + 1)` twice in the same handler (starting at 0) results in:
React
Setstate
Trung bình
4 lựa chọn
When is the updater form especially important?
React
Setstate
Nâng cao
4 lựa chọn
What does an empty dependency array `[]` in useEffect mean?
React
Effects
Cơ bản
4 lựa chọn
If you omit the dependency array of useEffect entirely, the effect:
React
Effects
Trung bình
4 lựa chọn
What does the dependency array control?
React
Effects
Nâng cao
4 lựa chọn
What is `useRef` primarily used for?
React
Useref
Cơ bản
4 lựa chọn
A common DOM use of useRef is to:
React
Useref
Trung bình
4 lựa chọn
Updating `ref.current` differs from updating state because it:
React
Useref
Nâng cao
4 lựa chọn
What does `useCallback` return?
React
Usecallback
Cơ bản
4 lựa chọn
What is the real benefit of the referential stability useCallback provides?
React
Usecallback
Trung bình
4 lựa chọn
How does the React Compiler (stable in React 19) affect useCallback usage?
React
Usecallback
Nâng cao
4 lựa chọn
What is `useMemo` used for?
React
Usememo
Cơ bản
4 lựa chọn
When is useMemo most appropriate?
React
Usememo
Trung bình
4 lựa chọn
What is the key difference between useMemo and useCallback?
React
Usememo
Nâng cao
4 lựa chọn
What does `useReducer` return?
React
Usereducer
Cơ bản
4 lựa chọn
When is useReducer preferable to useState?
React
Usereducer
Trung bình
4 lựa chọn
What two arguments does useReducer take?
React
Usereducer
Nâng cao
4 lựa chọn
What does the `useId` hook generate?
React
Useid
Cơ bản
4 lựa chọn
Why does useId exist?
React
Useid
Trung bình
4 lựa chọn
Which is an appropriate use of useId?
React
Useid
Nâng cao
4 lựa chọn
What triggers a re-render in React?
React
Rendering
Cơ bản
4 lựa chọn
During a re-render, how does React decide what DOM to update?
React
Rendering
Trung bình
4 lựa chọn
What are React Fragments used for?
React
Fragments
Cơ bản
4 lựa chọn
Which is the shorthand syntax for a React Fragment?
React
Fragments
Trung bình
4 lựa chọn
What was `forwardRef()` historically used for?
React
Refs
Cơ bản
4 lựa chọn
What changed about forwardRef in React 19?
React
Refs
Trung bình
4 lựa chọn
In React 19+, how does a function component receive a forwarded ref?
React
Refs
Nâng cao
4 lựa chọn
What is the most idiomatic way to fully reset a component's state?
React
State Reset
Cơ bản
4 lựa chọn
For a finer-grained reset without remounting, you can:
React
State Reset
Trung bình
4 lựa chọn
Why does changing the key reset state?
React
State Reset
Nâng cao
4 lựa chọn
Why does React recommend against mutating state directly?
React
Immutability
Cơ bản
4 lựa chọn
Mutating state in place can break which of the following?
React
Immutability
Trung bình
4 lựa chọn
What is the correct way to update array state immutably?
React
Immutability
Nâng cao
4 lựa chọn
What do error boundaries do?
React
Error Boundaries
Cơ bản
4 lựa chọn
Which do error boundaries NOT catch?
React
Error Boundaries
Trung bình
4 lựa chọn
How are error boundaries implemented today?
React
Error Boundaries
Nâng cao
4 lựa chọn
Which library encourages testing React components the way users interact with them?
React
Testing
Cơ bản
4 lựa chọn
Which tool is preferred for simulating user interactions in tests?
React
Testing
Trung bình
4 lựa chọn
Which tool is commonly used to mock network calls in React tests?
React
Testing
Nâng cao
4 lựa chọn
What is React hydration?
React
Hydration
Cơ bản
4 lựa chọn
Hydration happens after which step?
React
Hydration
Trung bình
4 lựa chọn
What do React Portals let you do?
React
Portals
Cơ bản
4 lựa chọn
Even though a portal's DOM lives elsewhere, events from it:
React
Portals
Trung bình
4 lựa chọn
Which function creates a portal?
React
Portals
Nâng cao
4 lựa chọn
Which browser extension helps inspect the React component tree?
React
Debugging
Cơ bản
4 lựa chọn
Enabling Strict Mode during development helps by:
React
Debugging
Trung bình
4 lựa chọn
What does React Strict Mode render to the page?
React
Strict Mode
Cơ bản
4 lựa chọn
Which is a benefit of Strict Mode?
React
Strict Mode
Trung bình
4 lựa chọn
What behavior does Strict Mode add to effects in development?
React
Strict Mode
Nâng cao
4 lựa chọn
Which libraries are commonly used to localize React applications?
React
I18n
Cơ bản
4 lựa chọn
With react-i18next, how do you typically render translated text?
React
I18n
Trung bình
4 lựa chọn
What is code splitting in a React application?
React
Code Splitting
Cơ bản
4 lựa chọn
Which React APIs enable code splitting for components?
React
Code Splitting
Trung bình
4 lựa chọn
What does the `fallback` prop of Suspense provide during lazy loading?
React
Code Splitting
Nâng cao
4 lựa chọn
In 2026, what should you adopt first to reduce context-driven re-renders?
React
Context Perf
Cơ bản
4 lựa chọn
Which pattern reduces re-renders for consumers that only dispatch?
React
Context Perf
Trung bình
4 lựa chọn
Which library helps subscribe to a slice of a large context value?
React
Context Perf
Nâng cao
4 lựa chọn
What is a higher order component (HOC)?
React
Hoc
Cơ bản
4 lựa chọn
What is the modern recommendation regarding HOCs?
React
Hoc
Trung bình
4 lựa chọn
Which well-known API is an example of an HOC?
React
Hoc
Nâng cao
4 lựa chọn
What data flow does the Flux pattern enforce?
React
Flux
Cơ bản
4 lựa chọn
In Flux, what is the role of the Dispatcher?
React
Flux
Trung bình
4 lựa chọn
Which modern tools were inspired by Flux?
React
Flux
Nâng cao
4 lựa chọn
In React's one-way data flow, data moves:
React
Data Flow
Cơ bản
4 lựa chọn
React's one-way data flow contrasts with which mechanism?
React
Data Flow
Trung bình
4 lựa chọn
What does the React documentation recommend instead of hand-rolling useEffect + fetch?
React
Async Data
Cơ bản
4 lựa chọn
In React 19, which hook lets a component read a promise directly and suspend?
React
Async Data
Trung bình
4 lựa chọn
A hand-written useEffect + fetch needs which safeguards to avoid bugs?
React
Async Data
Nâng cao
4 lựa chọn
What is server-side rendering (SSR) in React?
React
Ssr
Cơ bản
4 lựa chọn
Which is a benefit of SSR?
React
Ssr
Trung bình
4 lựa chọn
Which API enables streaming SSR in Node?
React
Ssr
Nâng cao
4 lựa chọn
When does static generation (SSG) render pages?
React
Ssg
Cơ bản
4 lựa chọn
What does Incremental Static Regeneration (ISR) add to SSG?
React
Ssg
Trung bình
4 lựa chọn
SSG is best suited for content that:
React
Ssg
Nâng cao
4 lựa chọn
In the presentational vs container pattern, presentational components:
React
Patterns
Cơ bản
4 lựa chọn
What is the modern view on the presentational/container split?
React
Patterns
Trung bình
4 lựa chọn
Which is a common data-fetching pitfall in React?
React
Data Fetching Pitfalls
Cơ bản
4 lựa chọn
Why can fetching data during render cause problems?
React
Data Fetching Pitfalls
Trung bình
4 lựa chọn
What should you account for regarding StrictMode and effects during development?
React
Data Fetching Pitfalls
Nâng cao
4 lựa chọn
What is a render prop?
React
Render Props
Cơ bản
4 lựa chọn
Which is the more common modern form of a render prop?
React
Render Props
Trung bình
4 lựa chọn
What largely replaced render props for sharing stateful logic?
React
Render Props
Nâng cao
4 lựa chọn
Which is a React anti-pattern?
React
Anti Patterns
Cơ bản
4 lựa chọn
Which of these is an anti-pattern related to derived data?
React
Anti Patterns
Trung bình
4 lựa chọn
Why is mirroring props into useState an anti-pattern?
React
Anti Patterns
Nâng cao
4 lựa chọn
Which tool fits purely local component state?
React
State Decision
Cơ bản
4 lựa chọn
React Context is best used for values that:
React
State Decision
Trung bình
4 lựa chọn
How should server state (caching, refetching, invalidation) be handled?
React
State Decision
Nâng cao
4 lựa chọn
What is the composition pattern in React?
React
Composition
Cơ bản
4 lựa chọn
Which is a form of composition in React?
React
Composition
Trung bình
4 lựa chọn
A parent that exposes related sub-components like <Tabs.List> and <Tabs.Panel> is an example of:
React
Composition
Nâng cao
4 lựa chọn
What is the 'virtual DOM' in React?
React
Virtual Dom
Cơ bản
4 lựa chọn
What is the main benefit of the virtual DOM?
React
Virtual Dom
Trung bình
4 lựa chọn
Which terms does the React team now prefer over 'virtual DOM'?
React
Virtual Dom
Nâng cao
4 lựa chọn
What is React Fiber?
React
Fiber
Cơ bản
4 lựa chọn
What key capability does Fiber add to rendering?
React
Fiber
Trung bình
4 lựa chọn
Which features did Fiber make possible that the old stack reconciler could not?
React
Fiber
Nâng cao
4 lựa chọn
What is reconciliation in React?
React
Reconciliation
Cơ bản
4 lựa chọn
What is the comparison step in reconciliation called?
React
Reconciliation
Trung bình
4 lựa chọn
What does React Suspense let you do?
React
Suspense
Cơ bản
4 lựa chọn
Suspense is commonly used together with which API for code splitting?
React
Suspense
Trung bình
4 lựa chọn
What happens immediately when a useState setter is called?
React
Setstate
Cơ bản
4 lựa chọn
How does React handle multiple setState calls in the same event?
React
Setstate
Trung bình
4 lựa chọn
Because state updates are batched and asynchronous, reading the state variable right after calling its setter gives you:
React
Setstate
Nâng cao
4 lựa chọn