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…
The three logical assignment operators short-circuit, which means the right-hand side is not evaluated and the assignment does not happen at all when the operator does not fire.…
Cleanup belongs beside the thing it cleans up, and a composable can register lifecycle hooks because it runs inside the component’s setup scope. A mixin could register hooks…
A snapshot test asserts that output has not changed, which is only useful if somebody reads the diff when it does. The regeneration reflex is what makes snapshot…
React 16 attached every handler to document and 17 attaches them to the root container, which changes what stopPropagation can prevent. The change exists to make two React…
JSX compiled to React.createElement required React to be in scope; the new transform imports what it needs itself. The output is marginally smaller and the ceremony disappears, and…
Provide and inject pass a value down a component tree without prop drilling, and they hide the dependency from everything that reads the component in isolation. The string…
String.replace with a string pattern replaces the first occurrence only, which is the most surprised anybody has been by a standard library method. Escaping user input to build…