Frontend
Write types for a reduce function using generics (array type, callback with accumulator, current value, index, initial value).
Tell me more about caching for fast page delivery. Provide an example on the second interface (question screen).
Tell about a complex task you solved in an editor.
There is a React component where clicking a button twice calls setState with the boolean value inverted. Will it work correctly? What is batching in React?
Which object copying methods can copy functions from one object to another?
What is the difference between defer and async attributes in the script tag?
If the task is unfamiliar and time is limited (for example, a week), how do you act?
import React, { useState, useEffect, useRef, useContext, useReducer, useMemo } from 'react'; export default Effects = () => { const [count, setCount] = useState(0); useLayoutEffect(() => console.log("each render 1")); console.log("each render 2"); useEffect(() => console.log("each render 3")); return ( <> <button onClick={() => setCount((prevProps) => ++prevProps)}> Increment </button> </> ) }
What are your expectations as an employee over the course of six months to a year of work?
How will the asymptotic complexity and memory consumption change in the task camelCase → snake_case if the result is collected by concatenating strings instead of an array of characters?
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?
What cookie attributes do you remember?
—SEPARATOR—
How did you work with AI when writing tests?
What are the disadvantages of WebSocket compared to other methods of client-server interaction?
Explain the lifecycle of a React component. How to handle unmounting with useEffect?
Tell about your education. How did you come into the IT field?
Tell us how well you understand what the company is, what product it offers, and what you will be doing?
// It is necessary to check the solution to the problem on two services by calling: // 1. checkResult(url1, solution) // 2. checkResult(url2, solution) // // checkResult: (url: string, solution: string | number) => Promise<boolean>; // // - If both requests return true - log success // - If at least one returns false - log fail // - If at least one does not respond - log error // - If at least one responds longer than 1 sec - log timeout
import { useState, useRef, useEffect } from "react"; const useDebugRender = ({props}) => { const prevProp = useRef(props) useEffect(() => { }, []) } const ParentComponent = () => { const [random, setRandom] = useState(0); // Passes to child component as a Prop const [text, setText] = useState(""); // Passes to child component as a Prop const createRandom = () => setRandom(Math.floor(Math.random() * 100)); const onTextChange = (e) => setText(e.target.value); const [count, setCount] = useState(0); const incrementCount = () => setCount((prev) => prev + 1); // This function is passed as a prop to the child component return ( <> <Count: {count} /> <input type="text" onChange={onTextChange} /> <button onClick={createRandom}>Generate Random</button> <div> <ChildComponent random={random} text={text} incrementCount={incrementCount} /> </div> </> ); }; export default ParentComponent;