Use requestAnimationFrame instead of nextTick