How can you find out about form issues in production if it stops working (for example, registration does not complete)?
Frontend
How can TTFB (Time To First Byte) metric degrade during SSR, what is the nature of the slowdowns, and how can it be improved? Describe what happens from pressing Enter to something appearing on the screen.
function promiseWithResolve() { // Not implemented } const { resolve, promise } = promiseWithResolve(); promise.then((v) => console.log(v)) setTimeout(() => resolve(13), 10)
Implement the callLimit function, which limits the number of calls to the given function to a specified limit, and also provides a reset method to reset the counter.
You need to write a function sum that, when called with an argument, accumulates the number, and when called without an argument, returns the accumulated number. For example: sum(2)(1)(2)() should return 5.
Imagine a situation: just before the release, you find a bug that causes a feature to work incorrectly. You cannot delay the release, but you understand that something is not working correctly. What will you do in such a situation?
The user pressed a button, a large data array came from the backend, and the screen froze. What could have caused this and how to fix it?
Implement TypeScript typing for URL validation to allow only correct URLs of the form: base domain + path (users/orders/messages) + method (get/update/delete/ban). Arbitrary strings should cause a compile error.
Suppose we have an online store that displays a list of 50 products per page with pagination. When a user switches to the second page, especially on a phone, they see white squares instead of images for a long time. How can we make the images appear faster?
Have you encountered CI/CD, maybe made some Docker containers or set up pipelines?
export function foo(o, arr) { return arr.reduce((a, x) => { // if (o.hasOwnProperty(x)) a[x] = o[x]; if (o[x]) a[x] = o[x]; return a; }, {}); } const obj = {a: 's'} foo(obj, ['a'])
Make sure that the UserName component displays the new username after successful form submission.
Understand what this code does and how it can be used. A similar helper exists in lodash — if you recognize it, you can just name it.
Have you worked with SSR? What did you do — specifically SSR, SSG, or just used Next.js?
Suppose we see that styles load slowly every time a user visits or refreshes the site. Making Critical CSS is difficult. What should be checked specifically for CSS and generally for any static content?
The user complains that the button sometimes does not respond to clicks, but locally the problem cannot be reproduced. What are your debugging steps? What could be the reasons?
How do you fetch data from an API inside a thunk, considering that the API is passed as an extra argument in thunk middleware?
What can block the HTML parsing process?
Have you heard of Web Vitals and specifically about the FCP metric? Tell us what you know about Web Vitals metrics.
The API response may contain an error that should be displayed to the user next to the corresponding field.