Editorial

All articles

Search articles →
Programming

Why URL.createObjectURL Can Keep Memory Growing After Files Are Closed

Closing an image or PDF preview does not necessarily release the file's data. A forgotten Blob URL can keep its underlying resource alive long after the preview disappears.

Programming

React Inputs Lose Focus After Every Keystroke: Why It Happens

An input that loses focus after every character may look like a state management problem. Often React is replacing the element entirely, and the reason is hidden somewhere above the input.

Tutorials

Testing a React Component That Uses Two Renderers with Jest

A focused guide to a rare React testing case: a component tree that combines react-test-renderer with React DOM. Learn why updates need the right act() boundary, how to structure a Jest test, and when a simpler test is better.

Programming

TypeScript Says an Array Element May Be Undefined Even After Checking Its Length

An array passes a length check, yet TypeScript still treats its first element as possibly undefined. The explanation lies in the difference between an array's length, its actual elements, and the guarantees its type provides.

Programming

Why React useEffect Runs Forever Even When Dependencies Look Correct

An effect lists its dependencies correctly, yet continues running after every render. The missing detail may be an object recreated each time, even when none of its properties change.

Programming

Why removeEventListener Doesn't Remove the Listener in React

A React component removes its event listener during cleanup, yet the handler continues firing. The cleanup may be running correctly while passing a different function to the browser.

Programming

The Result of getSnapshot Should Be Cached: A React Error That Looks Like an Infinite Render

React reports an infinite-loop warning even though no effect updates state. The actual problem may be a getSnapshot function that creates a new object every time it is called.

Programming

Why React Renders a Random Zero Instead of Hiding a Component

A React component should disappear when an array becomes empty, but a zero appears in its place. The cause is hidden in what JavaScript's && operator actually returns.

Programming

React Says an Input Changed from Uncontrolled to Controlled — But Why?

A form works normally after loading user data, but React reports that an input changed from uncontrolled to controlled. The cause may be the value passed during the very first render.