Scripts for the editing screen do not go on admin_enqueue_scripts — there is a dedicated hook, and using the wrong one loads the editor bundle on every admin…
Merging objects meant Object.assign({}, a, b), and forgetting the empty first argument mutated a — a bug that shows up two components away from where it was written.…
A promise from fetch resolves for any response the server returned, including a 500, and rejects only when the request could not be made at all. This is…
A JavaScript dependency without types is either an any, which defeats the point, or a declaration file, which takes ten minutes and only needs to describe what you…
A touchstart or wheel listener may call preventDefault, so the browser cannot start scrolling until the handler has run — which means every such listener delays scroll by…
CommonsChunkPlugin required declaring which modules were common, which meant knowing the dependency graph in advance and updating the configuration whenever it changed. chunks: ‘all’ lets it split synchronous…
Lazy-loading images with a scroll listener means running getBoundingClientRect for every candidate on every scroll event, which forces layout and is exactly the work that makes scrolling stutter.…
A type-ahead search fires a request per keystroke, and the responses arrive out of order — so the results for “lap” can overwrite the results for “laptop”. Aborting…