We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e92a09 commit 1c2cb7dCopy full SHA for 1c2cb7d
packages/react-ape/renderer/core/render.js
@@ -23,18 +23,20 @@ function renderApeQueue(
23
) {
24
if (apeContextGlobal && apeContextGlobal.renderQueue.length) {
25
const queue = apeContextGlobal.renderQueue;
26
+ let req;
27
+
28
const frame = () => {
- requestAnimationFrame(frame);
29
+ req = requestAnimationFrame(frame);
30
const element = queue.shift();
31
element.render(apeContextGlobal, element.parentLayout);
32
33
requestAnimationFrame(frame);
34
35
if (!queue.length) {
- cancelAnimationFrame(frame);
36
+ cancelAnimationFrame(req);
37
onFinish();
38
}
- }
39
+ };
40
frame();
41
42
0 commit comments