useTransition marks an update as interruptible

Some state changes are urgent and some are not, and React had no way to be told which until 18.

const [isPending, startTransition] = useTransition()
const [query, setQuery] = useState('')
const [results, setResults] = useState([])

function onChange(e) {
  setQuery(e.target.value)           // urgent: the input

  startTransition(() => {
    setResults(search(e.target.value))   // interruptible
  })
}

The input staying responsive while an expensive list re-renders is the visible outcome, and it works because React can abandon the transition render when another keystroke arrives. It only helps when the slow part is rendering rather than fetching — a transition wrapping an async call does nothing useful, which is the most common misuse.