Frontend
When is the cleanup function in `useEffect` executed and what does it do in this case?
What is the difference between the DOMContentLoaded and load events? When should each be used?
What is CORS and what is it used for? How to allow requests from all sources?
What are the next stages of the selection process after this interview?
What is the most resource-intensive part of rendering a page?
Will the object returned by the hook (`data`, `loading`, `error`) have the same reference between renders if the values haven't changed? Why? How to keep a stable reference to the object?
Implement a wrapper around fetch with retries: it takes the number of retries and fetch arguments, returns the same result as fetch, and after exhausting attempts, throws the last error.
How does HTTP differ from HTTPS?
Implement a storage class following the Observer pattern: the class stores data, allows subscribing and unsubscribing callback functions, and notifies all current subscribers of data changes, passing them the new data.
Connect the fixed hook in the second component and display a random number and the current scroll position.
What error can occur when counting comments using Map if there is no record for postId yet, and how to fix it?
How to correctly remove the `scroll` event handler if `addEventListener` and `removeEventListener` must receive the same function reference?
Tell about the structure of an HTTP request: what parts does it consist of?
What happens if the URL changes rapidly several times in a row?
What does this hook return on the first render? What will be the values of `data`, `loading`, and `error`?
Is `useCallback` needed here? What is it used for and in what cases is it useful?
Name an example of an HTTP header in a request and explain its purpose.
How to improve the retry wrapper around fetch to retry the request also when response.ok === false?
What does the underscore in a class property name, such as _data, mean, and does it make the property private?
What does the `getUser` function do inside the hook?