Inside a single rAF callback you write to the DOM, then read a layout property (offsetHeight), then write again. How does this interact with the browser's rendering pipeline for that frame?
requestAnimationFrame(() => {
el.style.width = '100px'; // write
const h = el.offsetHeight; // read
el.style.width = '200px'; // write
});