18 mounts, unmounts and remounts every component once in development under StrictMode, so an effect without cleanup runs twice and shows it. Every failure it produces is a…
Upgrading the package changes almost nothing; replacing render with createRoot is what switches the application into concurrent mode. Leaving the old call in place is a supported and…
Concurrent rendering can render the same component twice with different store values, which produces a torn UI unless the store tells React how to subscribe. The infinite loop…
React 17 batched state updates inside event handlers and not inside promises, timeouts or native handlers; 18 batches everywhere. Fewer renders is the intended benefit and the breakage…
A test asserting that a fetch happened once fails under React 18 development mode, and the test is wrong rather than the framework. Loosening the assertion to toHaveBeenCalled…
An error boundary catches errors thrown during rendering, in lifecycle methods and in constructors, and nothing thrown from a click handler or a promise. Handlers and promises need…
An effect listing a value in its dependencies and setting that value in its body is an infinite loop, and the analyser that suggested adding the dependency is…