Skip to content

Web

Web standards, frontend systems, APIs, and browser behavior.

Articles

24 total

Cannot Type into a React Input? Check value and onChange

See why an input with value but no state update reverts typed text, then test typing, clearing, and initialization.

Web3 min

React Router nested route shows an empty child page: check children and Outlet

When a parent layout appears but its child page does not, inspect the nested route match and where the parent renders Outlet.

Web3 min

JavaScript Press-and-Hold Button: Cancel the Timer on Release

Pair setTimeout with clearTimeout so a short press, pointer cancellation, or pointer exit cannot trigger a delayed action.

Web2 min

Does Promise.all stop other tasks when one promise rejects?

Trace two asynchronous tasks to see why an early Promise.all rejection does not cancel work already started, then compare allSettled and cancellation.

Web3 min

Why a Button Inside an HTML Form Submits It: button vs. submit

Choose between links, ordinary buttons, and submit buttons, and fix unexpected form submissions caused by a missing type attribute.

Web3 min

Why a CSS animation snaps back: animation-fill-mode forwards

Compare the same movement with fill-mode none and forwards, and distinguish a retained animation value from permanent UI state.

Web3 min

Why JavaScript forEach does not await async callbacks: for...of vs Promise.all

See why an all-done message appears before three asynchronous saves finish, then choose sequential for...of or concurrent Promise.all deliberately.

Web3 min

JavaScript fetch timeout: Why Promise.race does not cancel the request

A timeout from Promise.race stops waiting but leaves fetch running. Compare that behavior with AbortController and clean up the timer after reading the response.

Web3 min

Why fetch does not enter catch on HTTP 404: Check response.ok

A fetch Promise can fulfill with a 404 Response. Check response.ok to handle HTTP errors separately from network failures and body parsing errors.

Web3 min