A list component that takes items and a key, where the key must be a property of the item, was previously untypeable in a single-file component. The generic…
July’s 2.7 brings the Composition API and script setup to the 2.x line, which removes the main reason to rush a migration. The reactivity engine is still the…
A script setup component is closed by default, so a template ref to it exposes nothing until something is declared. Being closed by default is the correct choice…
ref makes an object deeply reactive, which walks the whole structure — expensive and pointless when the object is only ever replaced. The mutation not triggering is the…
The dependencies are collected by running the function, so a conditional branch that was not taken on the first run is not tracked. Automatic tracking is convenient and…
A modal rendered inside a component with overflow: hidden or a transform is clipped by an ancestor no amount of z-index will escape. Keeping the logical position while…
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…
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…