Skip to content
RED SAG Skills

Medium Frontend Developer questions

260 questions · 10 points each for a correct first answer.

  1. 1.setTimeout vs microtasksmedium
  2. 2.Closures in a var loopmedium
  3. 3.Stale value in useEffectmedium
  4. 4.Which CSS rule winsmedium
  5. 5.Debounce vs throttle for searchmedium
  6. 6.What INP measuresmedium
  7. 7.Event delegationmedium
  8. 8.Multiple setState callsmedium
  9. 9.Arrow function as an object methodmedium
  10. 10.One failed request breaks the dashboardmedium
  11. 11.What an async function returnsmedium
  12. 12.Function hoisting and letmedium
  13. 13.Spread copies only one levelmedium
  14. 14.Responsive card grid without media queriesmedium
  15. 15.position: sticky does not stickmedium
  16. 16.Ref value not shown on screenmedium
  17. 17.Resize handler that runs many timesmedium
  18. 18.Syncing derived values with an effectmedium
  19. 19.Form keeps the previous user datamedium
  20. 20.Test fails before data arrivesmedium
  21. 21.toBe fails on equal objectsmedium
  22. 22.Flaky end-to-end test with fixed waitsmedium
  23. 23.Content jumps when images loadmedium
  24. 24.Slow LCP from the hero imagemedium
  25. 25.Caching fingerprinted bundlesmedium
  26. 26.Fixing a CORS errormedium
  27. 27.Where to keep a session tokenmedium
  28. 28.Clickable div and keyboard usersmedium
  29. 29.What showModal gives youmedium
  30. 30.unknown versus anymedium
  31. 31.useState in a Server Componentmedium
  32. 32.Secret key with NEXT_PUBLIC_ prefixmedium
  33. 33.reduce on an empty arraymedium
  34. 34.Which value a CSS variable takesmedium
  35. 35.Native element or ARIAmedium
  36. 36.Announcing "Added to cart"medium
  37. 37.Grouping radio buttonsmedium
  38. 38.Autofill for an OTP fieldmedium
  39. 39.A PIN field on mobilemedium
  40. 40.Serving AVIF with a fallbackmedium
  41. 41.Images that push content downmedium
  42. 42.Order of async scriptsmedium
  43. 43.Showing a user commentmedium
  44. 44.Live versus static listsmedium
  45. 45.target versus currentTargetmedium
  46. 46.preventDefault versus stopPropagationmedium
  47. 47.form.submit versus requestSubmitmedium
  48. 48.tabindex="3" on a fieldmedium
  49. 49.Skip link at the topmedium
  50. 50.hidden versus aria-hiddenmedium
  51. 51.State of a menu buttonmedium
  52. 52.Loading the hero image soonermedium
  53. 53.A preloaded font downloaded twicemedium
  54. 54.Pressing Enter in a search fieldmedium
  55. 55.Specificity of a nav link selectormedium
  56. 56.Inline style versus !importantmedium
  57. 57.:is() versus :where()medium
  58. 58.Styling a card that has an imagemedium
  59. 59.What flex: 1 meansmedium
  60. 60.Widths from flex-growmedium
  61. 61.Pushing one nav item to the rightmedium
  62. 62.One flex item aligned differentlymedium
  63. 63.Naming grid areasmedium
  64. 64.A featured card that spans two columnsmedium
  65. 65.Column width with gapsmedium
  66. 66.Centering with one grid rulemedium
  67. 67.Moving an element with position: relativemedium
  68. 68.An overlay that covers its cardmedium
  69. 69.Icons that follow text colourmedium
  70. 70.Width that leaves room for a sidebarmedium
  71. 71.Font size from clamp()medium
  72. 72.Spacing that flips for Arabicmedium
  73. 73.Focus rings only for the keyboardmedium
  74. 74.Resetting a propertymedium
  75. 75.Why a big CSS file delays first paintmedium
  76. 76.A print stylesheet and render blockingmedium
  77. 77.will-change on everythingmedium
  78. 78.A slow loop that resizes cardsmedium
  79. 79.CSS variables versus Sass variablesmedium
  80. 80.Reading a BEM class namemedium
  81. 81.What CSS Modules domedium
  82. 82.A Tailwind colour that never appearsmedium
  83. 83.Using transition: allmedium
  84. 84.Using a feature only where it existsmedium
  85. 85.Which image srcset downloadsmedium
  86. 86.White scrollbars in dark modemedium
  87. 87.A manual dark mode togglemedium
  88. 88.Anchor target hidden under a headermedium
  89. 89.A swipe carousel without JavaScriptmedium
  90. 90.A small gap below an imagemedium
  91. 91.typeof before a let declarationmedium
  92. 92.Reading a var before it is setmedium
  93. 93.Two counters from one factorymedium
  94. 94.Keeping a balance privatemedium
  95. 95.this in a plain function callmedium
  96. 96.Calling bind twicemedium
  97. 97.Property found on the prototypemedium
  98. 98.Arrow field versus class methodmedium
  99. 99.null compared looselymedium
  100. 100.Adding two arraysmedium
  101. 101.Freezing a nested configmedium
  102. 102.What structuredClone cannot copymedium
  103. 103.Objects as keys in a plain objectmedium
  104. 104.Attaching data to DOM nodesmedium
  105. 105.map over new Array(3)medium
  106. 106.slice versus splicemedium
  107. 107.for...in over an arraymedium
  108. 108.Number versus parseInt on "12px"medium
  109. 109.includes versus indexOf with NaNmedium
  110. 110.Return value with finallymedium
  111. 111.When the executor runsmedium
  112. 112.A chain after catchmedium
  113. 113.Order of Promise.all resultsmedium
  114. 114.Reading pages with for awaitmedium
  115. 115.Error inside a setTimeout callbackmedium
  116. 116.Total wait with exponential backoffmedium
  117. 117.Timing a JavaScript animationmedium
  118. 118.Loading a chart library on clickmedium
  119. 119.An imported let that changesmedium
  120. 120.__dirname in an ES modulemedium
  121. 121.nextTick versus promise in Nodemedium
  122. 122.Wrapping an error with a causemedium
  123. 123.Adding a timeout to fetchmedium
  124. 124.Listener that will not go awaymedium
  125. 125.Passive touch listenersmedium
  126. 126.Handler that should run oncemedium
  127. 127.When Promise.any rejectsmedium
  128. 128.An endless chain of microtasksmedium
  129. 129.Resolving with two valuesmedium
  130. 130.What Promise.withResolvers givesmedium
  131. 131.Inferring a generic typemedium
  132. 132.Constraining a genericmedium
  133. 133.A typed getter with keyofmedium
  134. 134.Type for a PATCH bodymedium
  135. 135.A tax-rate lookup tablemedium
  136. 136.Narrowing on a kind fieldmedium
  137. 137.A function that narrows a typemedium
  138. 138.Narrowing with the in operatormedium
  139. 139.The ! after a valuemedium
  140. 140.satisfies versus a type annotationmedium
  141. 141.Reusing a function’s return typemedium
  142. 142.Passing an object with extra fieldsmedium
  143. 143.Indexing with noUncheckedIndexedAccessmedium
  144. 144.Unwrapping a promise typemedium
  145. 145.Changing an object in statemedium
  146. 146.Adding to a list in statemedium
  147. 147.Removing a row from statemedium
  148. 148.Expensive initial statemedium
  149. 149.An input that loses focus on each keymedium
  150. 150.Two counters that share statemedium
  151. 151.Uncontrolled to controlled warningmedium
  152. 152.Same key in two different listsmedium
  153. 153.Passing a prop through five layersmedium
  154. 154.When to reach for useReducermedium
  155. 155.State becomes undefined after an actionmedium
  156. 156.A button inside a clickable cardmedium
  157. 157.Children re-render with the parentmedium
  158. 158.A hook inside an ifmedium
  159. 159.Two components using one custom hookmedium
  160. 160.Unique ids for a reusable fieldmedium
  161. 161.useFormStatus always says not pendingmedium
  162. 162.Showing a form action’s resultmedium
  163. 163.Default prop valuesmedium
  164. 164.When React onChange firesmedium
  165. 165.An effect that re-runs on every rendermedium
  166. 166.useMemo that recomputes every timemedium
  167. 167.useCallback that changes nothingmedium
  168. 168.A slow page from one hover statemedium
  169. 169.Exposing only focus() from a componentmedium
  170. 170.Cleaning up a window listener in an effectmedium
  171. 171.Rendering 20,000 rowsmedium
  172. 172.Where to split a bundle firstmedium
  173. 173.A Server Component inside a client wrappermedium
  174. 174.Security of a Server Functionmedium
  175. 175.staleTime versus gcTimemedium
  176. 176.Wrong orders shown for a new filtermedium
  177. 177.userEvent versus fireEventmedium
  178. 178.Testing text that appears after a fetchmedium
  179. 179.The "not wrapped in act" warningmedium
  180. 180.A store hook that re-renders too oftenmedium
  181. 181.What the React Compiler doesmedium
  182. 182.A tab switch that freezes the pagemedium
  183. 183.dispatch in a dependency arraymedium
  184. 184.The memo compare functionmedium
  185. 185.Flexbox defaults in React Nativemedium
  186. 186.Different code for iOS and Androidmedium
  187. 187.Sharing logic: hook or HOCmedium
  188. 188.What a render prop ismedium
  189. 189.Building <Tabs> with <Tabs.Tab>medium
  190. 190.Supporting both controlled and uncontrolledmedium
  191. 191.Where focus goes after a modalmedium
  192. 192.A big form that re-renders on each keymedium
  193. 193.Filters lost on refreshmedium
  194. 194.A list that stops updatingmedium
  195. 195.Computing one layout shiftmedium
  196. 196.What can be the LCP elementmedium
  197. 197.Raising the hero image prioritymedium
  198. 198.preload versus prefetchmedium
  199. 199.Console warning after preloadmedium
  200. 200.Default behaviour of module scriptsmedium
  201. 201.Inlining critical CSSmedium
  202. 202.dns-prefetch or preconnectmedium
  203. 203.Computing Total Blocking Timemedium
  204. 204.Parts of an interactionmedium
  205. 205.Breaking up a long handlermedium
  206. 206.Reading LCP in codemedium
  207. 207.Collecting real-user metricsmedium
  208. 208.Redirect chain hurts TTFBmedium
  209. 209.Page not restored on Backmedium
  210. 210.Instant next-page loadsmedium
  211. 211.Skipping off-screen renderingmedium
  212. 212.Heavy chat widgetmedium
  213. 213.Clicks ignored after loadmedium
  214. 214.Lazy loading every imagemedium
  215. 215.stale-while-revalidatemedium
  216. 216.Caching the HTML pagemedium
  217. 217.Getting sizes rightmedium
  218. 218.Origin load from hit ratiomedium
  219. 219.Low CDN hit ratiomedium
  220. 220.Large font for a few scriptsmedium
  221. 221.When to pick font-display: optionalmedium
  222. 222.Many weights of one fontmedium
  223. 223.Self-hosting Google Fontsmedium
  224. 224.Users stuck on old versionmedium
  225. 225.New service worker waitsmedium
  226. 226.Domain sharding todaymedium
  227. 227.Small file, slow pagemedium
  228. 228.Different crop for phonesmedium
  229. 229.Changing a file at the same URLmedium
  230. 230.Savings from Brotlimedium
  231. 231.Encoding images on uploadmedium
  232. 232.Heavy animated GIFmedium
  233. 233.Three map embeds below the foldmedium
  234. 234.Icon font for 20 iconsmedium
  235. 235."sideEffects": falsemedium
  236. 236.Why CommonJS shakes poorlymedium
  237. 237.Vendor chunk hash changesmedium
  238. 238.Two copies of one librarymedium
  239. 239.Finding why a package is installedmedium
  240. 240.Forcing a nested versionmedium
  241. 241.Does devDependencies keep code out?medium
  242. 242.Leak through a closuremedium
  243. 243.Timer survives the componentmedium
  244. 244.Caching data per DOM elementmedium
  245. 245.Removing many listeners at oncemedium
  246. 246.Low-priority background workmedium
  247. 247.Moment.js in the bundlemedium
  248. 248.Why esbuild is fastmedium
  249. 249.Polyfills nobody needsmedium
  250. 250.npm audit fix --forcemedium
  251. 251.Package not found in a monorepomedium
  252. 252.Finding unused JavaScriptmedium
  253. 253.Touch listener slows scrollingmedium
  254. 254.Large CSS from a UI kitmedium
  255. 255.Staying within a JS budgetmedium
  256. 256.Biggest weight in Lighthousemedium
  257. 257.Limiting layout workmedium
  258. 258.Polling an API that rarely changesmedium
  259. 259.Faster clicks on linksmedium
  260. 260.Serving AVIF from one URLmedium