Hard Frontend Developer questions
199 questions · 20 points each for a correct first answer.
- 1.Cause of a hydration mismatchreact, ssr, hydrationhard
- 2.Avoiding layout thrashingweb-performance, renderinghard
- 3.Race condition in data fetchingreact-hooks, asynchard
- 4.Why React.memo did not helpreact, performancehard
- 5.z-index that does not workcss, stacking-contexthard
- 6.Preventing XSS from user HTMLweb-security, xsshard
- 7.Reducing the initial bundleweb-performance, bundlinghard
- 8.Losing this when a method is extractedjavascript, this-bindinghard
- 9.Ellipsis that never truncates in Flexboxflexbox, css, debugginghard
- 10.Every context consumer re-rendersreact-context, react-performancehard
- 11.Effect that fetches foreverreact-hooks, debugginghard
- 12.Tooltip flashes in the wrong placereact-hooks, renderinghard
- 13.Janky slide-in animationweb-performance, css-animationshard
- 14.Order of logs around awaitevent-loop, async-javascripthard
- 15.Order of object keysjavascript, objectshard
- 16.map with parseIntjavascript, arrayshard
- 17.A CSP that stops injected scriptsweb-security, content-security-policyhard
- 18.CSRF risk left with SameSite=Laxweb-security, csrfhard
- 19.Unsafe postMessage listenerweb-security, browser-apishard
- 20.Slow click handler hurts INPcore-web-vitals, web-performancehard
- 21.Layout shift when the web font loadsweb-fonts, core-web-vitalshard
- 22.Old version after deploy with a service workerservice-workers, cachinghard
- 23.Typing lags while a big list filtersreact-concurrency, react-performancehard
- 24.Optimistic like button done rightstate-management, ux-patternshard
- 25.Memory grows in a single-page appmemory-leaks, devtoolshard
- 26.Importing one function pulls a whole librarybundlers, web-performancehard
- 27.Cascade layers versus specificitycss, css-cascadehard
- 28.Card layout based on its own widthcss, responsive-designhard
- 29.Exhaustive check with nevertypescripthard
- 30.When extra properties are an errortypescripthard
- 31.Status message screen readers missaccessibility, ariahard
- 32.Comparator that returns a booleanjavascript, arrays, debugginghard
- 33.aria-hidden on a parent of a buttonhtml-css, accessibility, ariahard
- 34.Which label winshtml-css, accessibility, ariahard
- 35.Focus after client-side navigationhtml-css, accessibility, keyboardhard
- 36.Locking the page behind a drawerhtml-css, accessibilityhard
- 37.Global CSS and a shadow roothtml-css, web-componentshard
- 38.Naming a custom elementhtml-css, web-componentshard
- 39.What is inside a template taghtml-css, dom, web-componentshard
- 40.onclick stops working after adding CSPhtml-css, securityhard
- 41.Detecting the end of a listhtml-css, dom, performancehard
- 42.A field that stays invalidhtml-css, formshard
- 43.Minimum contrast for body texthtml-css, accessibilityhard
- 44.Minimum size of a tap targethtml-css, accessibilityhard
- 45.Reordering with CSS orderhtml-css, accessibility, flexboxhard
- 46.Relying on accept for uploadshtml-css, forms, securityhard
- 47.When a MutationObserver fireshtml-css, domhard
- 48.Child margin pushes the parent downhtml-css, box-modelhard
- 49.A parent that ignores floated childrenhtml-css, box-modelhard
- 50.What padding-top: 50% is based onhtml-css, box-modelhard
- 51.A grid column that will not shrinkhtml-css, gridhard
- 52.auto-fill versus auto-fit with few itemshtml-css, gridhard
- 53.A fixed modal that scrolls awayhtml-css, positioninghard
- 54.height: 100% that does nothinghtml-css, box-modelhard
- 55.Specificity of :not() with a listhtml-css, selectors, cascadehard
- 56.Aligning titles across cardshtml-css, gridhard
- 57.What dense packing doeshtml-css, grid, accessibilityhard
- 58.Widths after flex-shrinkhtml-css, flexboxhard
- 59.Animating a gradient anglehtml-css, animations, css-valueshard
- 60.z-index on a non-positioned blockhtml-css, positioninghard
- 61.Centring an absolute box with auto marginshtml-css, positioninghard
- 62.Order of values in gaphtml-css, gridhard
- 63.Full-height hero cut off on phoneshtml-css, responsive-design, css-unitshard
- 64.A view transition that is skippedhtml-css, animationshard
- 65.A very long page that renders slowlyhtml-css, performancehard
- 66.Arabic and English user commentshtml-css, internationalisationhard
- 67.A hover shadow that drops frameshtml-css, animations, performancehard
- 68.Percentages in left versus translatehtml-css, positioninghard
- 69.Buttons vanish in high contrast modehtml-css, accessibilityhard
- 70.Page jumps when a modal openshtml-css, responsive-designhard
- 71.Scrolling leaks out of a modalhtml-css, responsive-designhard
- 72.A bottom bar under the iPhone home indicatorhtml-css, responsive-designhard
- 73.Loading five font weightshtml-css, fonts, performancehard
- 74.Closure holding a big arrayjavascript, closures, memoryhard
- 75.Spreading an object with a getterjavascript, objectshard
- 76.Symbol keys and JSONjavascript, symbolshard
- 77.Object.is and negative zerojavascript, numbers, operatorshard
- 78.Deep merge of user JSONjavascript, security, prototypeshard
- 79.Sorting orders that tiejavascript, arrayshard
- 80.Using new on an arrow functionjavascript, functions, thishard
- 81.Checking for a private fieldjavascript, classeshard
- 82.Passing values into a generatorjavascript, generatorshard
- 83.Making an object spreadablejavascript, iteratorshard
- 84.Arguments to a tagged templatejavascript, stringshard
- 85.Proxy set trap that returns nothingjavascript, proxieshard
- 86.arguments inside an arrow functionjavascript, functionshard
- 87.Adding a BigInt and a numberjavascript, numbershard
- 88.Class getter and hasOwnPropertyjavascript, classes, jsonhard
- 89.return versus return await in tryjavascript, async-await, errorshard
- 90.A promise awaited too latejavascript, promises, nodejshard
- 91.Breaking out of for awaitjavascript, generators, async-awaithard
- 92.Progress bar that never movesjavascript, event-loop, performancehard
- 93.Sending a callback to a workerjavascript, web-workershard
- 94.ArrayBuffer after transferjavascript, web-workers, performancehard
- 95.Relying on FinalizationRegistryjavascript, memoryhard
- 96.setImmediate inside an I/O callbackjavascript, event-loop, nodejshard
- 97.A debounce that never debouncesjavascript, closures, timershard
- 98.Time with a concurrency limitjavascript, promises, performancehard
- 99.Throwing after resolvejavascript, promiseshard
- 100.Top-level await in a config modulejavascript, modules, async-awaithard
- 101.Promise.resolve of a promisejavascript, promiseshard
- 102.Breaking up a long taskjavascript, performance, event-loophard
- 103.try/catch around forEach with asyncjavascript, async-await, errorshard
- 104.A conditional type over a unionjavascript, typescript, conditional-typeshard
- 105.Extracting a type with inferjavascript, typescript, conditional-typeshard
- 106.Removing optional and readonlyjavascript, typescript, mapped-typeshard
- 107.Building handler names from keysjavascript, typescript, literal-typeshard
- 108.Method versus property function typesjavascript, typescript, functionshard
- 109.Stopping mixed-up string IDsjavascript, typescripthard
- 110.A const type parameterjavascript, typescript, genericshard
- 111.Type of the catch variablejavascript, typescript, strict-modehard
- 112.Typing a global on windowjavascript, typescript, interfaceshard
- 113.What the {} type acceptsjavascript, typescripthard
- 114.Batching inside a timeoutreact, rendering, statehard
- 115.Scrolling to a just-added messagereact, renderinghard
- 116.Too many re-renders errorreact, state, renderinghard
- 117.Resetting selection when items changereact, statehard
- 118.Setting state to the same valuereact, state, renderinghard
- 119.Items added twice in developmentreact, hooks, strict-modehard
- 120.A list item made of two elementsreact, listshard
- 121.Old value after an awaitreact, state, closureshard
- 122.use() that suspends foreverreact, react-19, suspensehard
- 123.Errors an error boundary missesreact, error-handlinghard
- 124.Which fallback showsreact, suspensehard
- 125.Clicks inside a portalreact, events, portalshard
- 126.Passing a ref to a function componentreact, refs, react-19hard
- 127.Cleanup from a ref callbackreact, refs, react-19hard
- 128.useContext with no Provider abovereact, contexthard
- 129.useEffect(async () => ...)react, effects, asynchard
- 130.Two socket connections in developmentreact, effects, strict-modehard
- 131.Relying on useMemo for correctnessreact, hookshard
- 132.Logging the latest theme from an effectreact, hooks, effectshard
- 133.Streaming HTML with Suspensereact, server-components, suspensehard
- 134.Passing onSelect from a Server Componentreact, server-componentshard
- 135.Putting a function in useStatereact, state, hookshard
- 136.Analytics event sent many timesreact, renderinghard
- 137.Reading a mutable store during renderreact, hooks, state-managementhard
- 138.A transition around typingreact, hooks, performancehard
- 139.One user lookup per requestreact, server-components, data-fetchinghard
- 140.Old content during a product changereact, suspensehard
- 141.A huge bundle from one helperreact, performance, toolshard
- 142.Mocking APIs in component testsreact, testinghard
- 143.Heavy work in useLayoutEffectreact, hooks, performancehard
- 144.Jumping to row 3,000 in a FlatListreact, react-native, performancehard
- 145.Animation stutters while data loadsreact, react-native, performancehard
- 146.A custom hook with a stale callbackreact, hooks, closureshard
- 147.Loading and error both truereact, state, patternshard
- 148.One slow field in a big formreact, performance, statehard
- 149.A user-supplied website linkreact, securityhard
- 150.Organising a growing React codebasereact, architecturehard
- 151.How CLS groups shiftsweb-performance, core-web-vitalshard
- 152.Shifts after a clickweb-performance, core-web-vitalshard
- 153.Where LCP time goesweb-performance, core-web-vitalshard
- 154.Download time of a bundleweb-performance, networkhard
- 155.Why the first 14 KB mattersweb-performance, networkhard
- 156.Finding the script behind slow INPweb-performance, main-threadhard
- 157.Big DOM, slow paintweb-performance, renderinghard
- 158.High TTFB only in the Gulfweb-performance, cachinghard
- 159.Marketing tags slow the pageweb-performance, third-partyhard
- 160.Font preloaded twiceweb-performance, fontshard
- 161.HTTP 103 Early Hintsweb-performance, networkhard
- 162.Loading non-critical CSSweb-performance, critical-rendering-pathhard
- 163.Good average, bad mobileweb-performance, measurementhard
- 164.LCP in a single-page appweb-performance, core-web-vitalshard
- 165.Explaining slow TTFBweb-performance, networkhard
- 166.No Cache-Control headerweb-performance, cachinghard
- 167.User data cached at the CDNweb-performance, cachinghard
- 168.Vary: User-Agent at the CDNweb-performance, cachinghard
- 169.Choosing an image CDN setupweb-performance, imageshard
- 170.Preloading all fontsweb-performance, fontshard
- 171.Matching the fallback fontweb-performance, fontshard
- 172.Service worker slows navigationsweb-performance, service-workershard
- 173.Large cookies on every requestweb-performance, networkhard
- 174.Version in a query stringweb-performance, cachinghard
- 175.Using HTTP/2 Server Pushweb-performance, networkhard
- 176.Picking the srcset candidateweb-performance, imageshard
- 177.Invisible text on 3Gweb-performance, fontshard
- 178.Origin outage resilienceweb-performance, cachinghard
- 179.Cache storage filling upweb-performance, service-workershard
- 180.Many edges hitting the originweb-performance, cachinghard
- 181.Same bytes, different costweb-performance, main-threadhard
- 182.Slow builds from index filesweb-performance, bundlershard
- 183.What scope hoisting givesweb-performance, bundlershard
- 184.Over-splitting a bundleweb-performance, bundlershard
- 185.Deep import breaks after upgradeweb-performance, npmhard
- 186.Two instances of one packageweb-performance, npmhard
- 187.Estimating a leakweb-performance, memoryhard
- 188.Leak from a global listenerweb-performance, memoryhard
- 189.Sending a big buffer to a workerweb-performance, main-threadhard
- 190.Page views jump after prerenderingweb-performance, speculation-ruleshard
- 191.Build fails after moving to pnpmweb-performance, npmhard
- 192.One vendor chunk for everythingweb-performance, bundlershard
- 193.Native import mapsweb-performance, build-toolshard
- 194.Risky install scriptsweb-performance, npmhard
- 195.Rendering a 10,000-row tableweb-performance, renderinghard
- 196.High input delay at loadweb-performance, main-threadhard
- 197.Cost of a font swap shiftweb-performance, fontshard
- 198.Lab looks fine, users complainweb-performance, measurementhard
- 199.Moving tags off the main threadweb-performance, third-partyhard