Yes. It seems to be a rendering issue. I think I have mis-used the term “hydration”, my apologies.
Take note of the function K
being the initialization of the jank.
If you inspect the function K
you will find the following:
function K() {
if (I !== null) {
var H = e.unstable_now();
$ = H;
var F = !0;
try {
F = I(!0, H)
} finally {
F ? U() : (O = !1,
I = null)
}
} else
O = !1
}
Minified, but thankfully ChatGPT is very good at understanding it.
It will tell you
It looks like part of a scheduling system, possibly inspired by or part of React’s Scheduler
or a similar asynchronous task-handling mechanism.
Finally, getting down to the function HV
starts to demonstrate actual rendering happening.
function HV(e, t) {
if (Dy = -1,
$y = 0,
ct & 6)
throw Error(le(327));
var n = e.callbackNode;
if (Qf() && e.callbackNode !== n)
return null;
var r = U2(e, e === er ? dr : 0);
if (r === 0)
return null;
if (r & 30 || r & e.expiredLanes || t)
t = i_(e, r);
else {
t = r;
var i = ct;
ct |= 2;
var o = zV();
(er !== e || dr !== t) && (cs = null,
kp = xn() + 500,
$l(e, t));
do
try {
p_e();
break
} catch (s) {
VV(e, s)
}
while (!0);
M7(),
t_.current = o,
ct = i,
Nn !== null ? t = 0 : (er = null,
dr = 0,
t = Bn)
}
if (t !== 0) {
if (t === 2 && (i = C5(e),
i !== 0 && (r = i,
t = Q5(e, i))),
t === 1)
throw n = V0,
$l(e, 0),
Ou(e, r),
vi(e, xn()),
n;
if (t === 6)
Ou(e, r);
else {
if (i = e.current.alternate,
!(r & 30) && !d_e(i) && (t = i_(e, r),
t === 2 && (o = C5(e),
o !== 0 && (r = o,
t = Q5(e, o))),
t === 1))
throw n = V0,
$l(e, 0),
Ou(e, r),
vi(e, xn()),
n;
switch (e.finishedWork = i,
e.finishedLanes = r,
t) {
case 0:
case 1:
throw Error(le(345));
case 2:
nl(e, ui, cs);
break;
case 3:
if (Ou(e, r),
(r & 130023424) === r && (t = Z7 + 500 - xn(),
10 < t)) {
if (U2(e, 0) !== 0)
break;
if (i = e.suspendedLanes,
(i & r) !== r) {
Br(),
e.pingedLanes |= e.suspendedLanes & i;
break
}
e.timeoutHandle = M5(nl.bind(null, e, ui, cs), t);
break
}
nl(e, ui, cs);
break;
case 4:
if (Ou(e, r),
(r & 4194240) === r)
break;
for (t = e.eventTimes,
i = -1; 0 < r; ) {
var a = 31 - zo(r);
o = 1 << a,
a = t[a],
a > i && (i = a),
r &= ~o
}
if (r = i,
r = xn() - r,
r = (120 > r ? 120 : 480 > r ? 480 : 1080 > r ? 1080 : 1920 > r ? 1920 : 3e3 > r ? 3e3 : 4320 > r ? 4320 : 1960 * l_e(r / 1960)) - r,
10 < r) {
e.timeoutHandle = M5(nl.bind(null, e, ui, cs), r);
break
}
nl(e, ui, cs);
break;
case 5:
nl(e, ui, cs);
break;
default:
throw Error(le(329))
}
}
}
return vi(e, xn()),
e.callbackNode === n ? HV.bind(null, e) : null
}
And, then, the actual rendering begins to happen under “updateFiberRecursively”
Which is a major contributor to the jank