Progressive enhancement

if (!document.startViewTransition) {
  await updateTheDOM(data);
  return;
}

const transition = document.startViewTransition(async () => {
  await updateTheDOM(data);
});