Which react-spring target are you using?
What version of react-spring are you using?
10.0.3
What's Wrong?
When combining a SpringValue that has loop: true and Globals.assign({skipAnimation:true}), there is an infinite loop that crashes the tab.
When setting immediate: true, this infinite loop runs every frame (with the request animation frame loop).
To Reproduce
This minimal code is enough to lock the main thread at 100% usage.
import { Globals, SpringValue } from "@react-spring/web";
Globals.assign({ skipAnimation: true });
new SpringValue(0, {
to: 1,
loop: true,
});
Expected Behaviour
If we are setting skipAnimation or immediate, I think the loop parameter should be ignored to avoid this infinite loop.
Link to repo
https://codesandbox.io/p/sandbox/tender-scott-5k6l8w
Which react-spring target are you using?
@react-spring/web@react-spring/three@react-spring/native@react-spring/konva@react-spring/zdogWhat version of react-spring are you using?
10.0.3
What's Wrong?
When combining a SpringValue that has
loop: trueandGlobals.assign({skipAnimation:true}), there is an infinite loop that crashes the tab.When setting immediate: true, this infinite loop runs every frame (with the request animation frame loop).
To Reproduce
This minimal code is enough to lock the main thread at 100% usage.
Expected Behaviour
If we are setting skipAnimation or immediate, I think the loop parameter should be ignored to avoid this infinite loop.
Link to repo
https://codesandbox.io/p/sandbox/tender-scott-5k6l8w